From cd28701d52176432d9b379b34033e7f666f5424d Mon Sep 17 00:00:00 2001 From: rncbc Date: Tue, 26 Jan 2021 11:10:54 +0000 Subject: [PATCH] Allow the MIDI file player restart on-demand (#755) Resets the default sample timer properly, allowing the internal MIDI file player to restart its playlist on any other time but the initial first. Lets Qsynth play any MIDI files that are drag-n-dropped, anytime after the first, following synth engine initialization. --- src/synth/fluid_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index a58113f0..1e0b29fb 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -535,7 +535,6 @@ fluid_sample_timer_t *new_fluid_sample_timer(fluid_synth_t *synth, fluid_timer_c } fluid_sample_timer_reset(synth, result); - result->isfinished = 0; result->data = data; result->callback = callback; result->next = synth->sample_timers; @@ -567,6 +566,7 @@ void delete_fluid_sample_timer(fluid_synth_t *synth, fluid_sample_timer_t *timer void fluid_sample_timer_reset(fluid_synth_t *synth, fluid_sample_timer_t *timer) { timer->starttick = fluid_synth_get_ticks(synth); + timer->isfinished = 0; } /***************************************************************