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.
This commit is contained in:
rncbc 2021-01-26 11:10:54 +00:00 committed by derselbst
parent 4b5afca76c
commit cd28701d52
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
/***************************************************************