Reset the synth after the end, not before the start of a song

This change prevents an unnecessary synth reset before the first
MIDI song is played. It allows changing synth parameters via a
config file without having to unset the player.reset-synth setting.
This commit is contained in:
Marcus Weseloh 2021-03-24 20:41:18 +01:00
parent d13c4965e1
commit 9a4b95a742

View file

@ -2059,11 +2059,6 @@ fluid_player_playlist_load(fluid_player_t *player, unsigned int msec)
player->start_ticks = 0;
player->cur_ticks = 0;
if(player->reset_synth_between_songs)
{
fluid_synth_system_reset(player->synth);
}
for(i = 0; i < player->ntracks; i++)
{
if(player->track[i] != NULL)
@ -2145,6 +2140,12 @@ fluid_player_callback(void *data, unsigned int msec)
{
FLUID_LOG(FLUID_DBG, "%s: %d: Duration=%.3f sec", __FILE__,
__LINE__, (msec - player->begin_msec) / 1000.0);
if(player->reset_synth_between_songs)
{
fluid_synth_system_reset(player->synth);
}
loadnextfile = 1;
}