aboutsummaryrefslogtreecommitdiff
path: root/src/sounds.h
diff options
context:
space:
mode:
authorspl3g <spleefer6@yandex.ru>2025-11-01 19:34:45 +0300
committerspl3g <spleefer6@yandex.ru>2025-11-01 19:34:45 +0300
commitb5bd5840744a0a3e36b1be8f9ab95492d1005bca (patch)
tree290ff4822cf0a5fb430a7b63d0f604de22fff5c0 /src/sounds.h
parenta468f82c2d967999c1723381f4066933faebcef6 (diff)
Show the waves! (badly)
Diffstat (limited to 'src/sounds.h')
-rw-r--r--src/sounds.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sounds.h b/src/sounds.h
index 290a0b0..2d185d6 100644
--- a/src/sounds.h
+++ b/src/sounds.h
@@ -9,6 +9,7 @@
#include "messages.h"
#include "midi_freqs.h"
+#include "defines.h"
#define check(ret) \
do { \
@@ -20,12 +21,10 @@
} \
} while (0)
-#define SAMPLE_RATE 48000
-#define PERIOD_SIZE 480
-
typedef struct {
snd_pcm_t *pcm;
message_queue *queue;
+ WaveData *wave_data;
} sound_thread_meta;
typedef enum {
@@ -68,6 +67,7 @@ typedef struct {
oscilator_type oscilator_type;
float master_volume;
envelope_params envelope_params;
+ float last_freq;
} synth_params;
typedef float (*oscilator_func)(float phase);