aboutsummaryrefslogtreecommitdiff
path: root/src/sounds.h
diff options
context:
space:
mode:
authorspl3g <spleefer6@yandex.ru>2025-11-06 16:15:51 +0300
committerspl3g <spleefer6@yandex.ru>2025-11-06 16:15:51 +0300
commit5d74f4437de84f784e0d972be03da03505154eb7 (patch)
treea57023526220e3e2dd9a2c06d6e69e80dd955151 /src/sounds.h
parente2b6ea033d57f8666d1f23bbfee2a6c886220e34 (diff)
Make all types UpperCamelCase
Diffstat (limited to 'src/sounds.h')
-rw-r--r--src/sounds.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/sounds.h b/src/sounds.h
index 2d185d6..639ce80 100644
--- a/src/sounds.h
+++ b/src/sounds.h
@@ -23,9 +23,9 @@
typedef struct {
snd_pcm_t *pcm;
- message_queue *queue;
+ MessageQueue *queue;
WaveData *wave_data;
-} sound_thread_meta;
+} SoundThreadMeta;
typedef enum {
ENV_OFF,
@@ -33,44 +33,44 @@ typedef enum {
ENV_DECAY,
ENV_SUSTAIN,
ENV_RELEASE,
-} envelope_state;
+} EnvelopeState;
typedef struct {
int attack_time;
int decay_time;
float sustain_level;
int release_time;
-} envelope_params;
+} EnvelopeParams;
typedef struct {
- envelope_state state;
+ EnvelopeState state;
int counter;
float current_inc;
float release_value;
- envelope_params params;
-} envelope;
+ EnvelopeParams params;
+} Envelope;
typedef struct {
bool active;
float freq;
float phase;
float phase_inc;
- envelope envelope;
-} synth_voice;
+ Envelope envelope;
+} SynthVoice;
typedef struct {
- synth_voice *buffer;
+ SynthVoice *buffer;
size_t size;
-} synth_voices;
+} SynthVoices;
typedef struct {
- oscilator_type oscilator_type;
+ OscilatorType oscilator_type;
float master_volume;
- envelope_params envelope_params;
+ EnvelopeParams envelope_params;
float last_freq;
-} synth_params;
+} SynthParams;
-typedef float (*oscilator_func)(float phase);
+typedef float (*OscilatorFunc)(float phase);
void *sound_thread_start(void *ptr);
int set_hw_params(snd_pcm_t *pcm);