summaryrefslogtreecommitdiff
path: root/synth.c
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-10-09 18:32:27 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-10-09 18:32:27 +0200
commitac6283f92b0579c0e820e13a83715389455d3171 (patch)
tree9db9e5ca0f6e30a5faab339757f37941ec134738 /synth.c
parent2468c0afd3ac239ae634cba24583467b8e553c37 (diff)
downloadttdaw-ac6283f92b0579c0e820e13a83715389455d3171.tar.gz
Added preset to args
Diffstat (limited to 'synth.c')
-rw-r--r--synth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/synth.c b/synth.c
index 05c3664..d65ba41 100644
--- a/synth.c
+++ b/synth.c
@@ -65,10 +65,10 @@ void *synth(void *arg) {
SDL_LockMutex(g_Mutex);
if (shared_data.state == 0) {
- tsf_note_off(g_TinySoundFont, shared_data.preset, shared_data.note);
+ tsf_note_off(g_TinySoundFont, args->soundfont_preset, shared_data.note);
} else {
float normalized_velocity = (float)shared_data.velocity / 127.0f;
- tsf_note_on(g_TinySoundFont, shared_data.preset, shared_data.note, normalized_velocity);
+ tsf_note_on(g_TinySoundFont, args->soundfont_preset, shared_data.note, normalized_velocity);
}
SDL_UnlockMutex(g_Mutex);