diff --git a/fluidsynth/src/fluid_midi.c b/fluidsynth/src/fluid_midi.c index e39d2897..4019ad92 100644 --- a/fluidsynth/src/fluid_midi.c +++ b/fluidsynth/src/fluid_midi.c @@ -1361,7 +1361,6 @@ int fluid_player_play(fluid_player_t* player) if (player->sample_timer == NULL) { return FLUID_FAILED; } - fluid_player_callback(player, 0); /* Process the first events before the first block */ } return FLUID_OK; } diff --git a/fluidsynth/src/fluid_synth.c b/fluidsynth/src/fluid_synth.c index c8497467..e4854b8d 100644 --- a/fluidsynth/src/fluid_synth.c +++ b/fluidsynth/src/fluid_synth.c @@ -2012,6 +2012,10 @@ fluid_synth_one_block(fluid_synth_t* synth, int do_not_mix_fx_to_out) fluid_check_fpe("??? Just starting up ???"); + fluid_sample_timer_process(synth); + + fluid_check_fpe("fluid_sample_timer_process"); + /* clean the audio buffers */ for (i = 0; i < synth->nbuf; i++) { FLUID_MEMSET(synth->left_buf[i], 0, byte_size); @@ -2125,10 +2129,6 @@ fluid_synth_one_block(fluid_synth_t* synth, int do_not_mix_fx_to_out) /* fluid_mutex_unlock(synth->busy); /\* Allow other threads to touch the synth *\/ */ - fluid_sample_timer_process(synth); - - fluid_check_fpe("fluid_sample_timer_process"); - return 0; }