diff options
| author | grm <grm@eyesin.space> | 2025-10-16 00:47:21 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2025-10-16 00:47:21 +0300 |
| commit | f0a57d10dd93580ef0b553b8781185fdc09b2da0 (patch) | |
| tree | b96538bf209a55f13aa0fb98f2480d06ece7e58f /src/osc_sound.c | |
| parent | 4248bf57800447e1abef618db9da4e0f1291d0f3 (diff) | |
| download | synth-project-f0a57d10dd93580ef0b553b8781185fdc09b2da0.tar.gz synth-project-f0a57d10dd93580ef0b553b8781185fdc09b2da0.tar.bz2 synth-project-f0a57d10dd93580ef0b553b8781185fdc09b2da0.zip | |
Add spinner for sound picking
Diffstat (limited to 'src/osc_sound.c')
| -rw-r--r-- | src/osc_sound.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osc_sound.c b/src/osc_sound.c index 10da73b..fc06a26 100644 --- a/src/osc_sound.c +++ b/src/osc_sound.c @@ -34,6 +34,16 @@ osc_sound(float offset) OSC_sound.data[osc_next_index(&OSC_sound, offset)]); } +void +osc_sound_change_wavetable(char *path) +{ + float * old_data = OSC_sound.data; + osc_load_wav(&OSC_sound, path); + OSC_sound.start = wvt_size*0; + OSC_sound.len = OSC_sound.start + wvt_size; + free(old_data); +} + float osc_sound_next(float f, float offset) { |
