Skip to content

Commit

Permalink
Fix player termination after stopping and restarting (#1273)
Browse files Browse the repository at this point in the history
If using the sample timer, reset cur_msec=0 in fluid_player_play() since the sample timer is also reset. This way fluid_player_callback() will not misinterpret the player's cur_msec < msec as being due to a fluid_synth_get_ticks overflow.
  • Loading branch information
albedozero committed Sep 24, 2023
1 parent 6721e92 commit 377ab9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/midi/fluid_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,7 @@ fluid_player_play(fluid_player_t *player)
if(!player->use_system_timer)
{
fluid_sample_timer_reset(player->synth, player->sample_timer);
player->cur_msec = 0;
}

/* If we're at the end of the playlist and there are no loops left, loop once */
Expand Down

0 comments on commit 377ab9d

Please sign in to comment.