mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 17:42:21 +00:00
Merge pull request #820 from FluidSynth/player-reset-between-songs
Reset synth after end, not before start of song
This commit is contained in:
commit
661a06b504
2 changed files with 7 additions and 6 deletions
|
@ -760,7 +760,7 @@ and commit the results. Refresh with the following command:
|
|||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<realtime/>
|
||||
<desc>If true, reset the synth before starting a new MIDI song, so the state of a previous song can't affect the new song. Turn it off for seamless looping of a song.</desc>
|
||||
<desc>If true, reset the synth after the end of a MIDI song, so that the state of a previous song can't affect the next song. Turn it off for seamless looping of a song.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>timing-source</name>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue