mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-04 01:51:06 +00:00
avoid hanging notes
This commit is contained in:
parent
7a803c3ee4
commit
aa8a32951a
1 changed files with 4 additions and 0 deletions
|
@ -1636,6 +1636,10 @@ fluid_player_callback(void *data, unsigned int msec)
|
||||||
+ (int) ((double) (player->cur_msec - player->start_msec)
|
+ (int) ((double) (player->cur_msec - player->start_msec)
|
||||||
/ player->deltatime + 0.5)); /* 0.5 to average overall error when casting */
|
/ player->deltatime + 0.5)); /* 0.5 to average overall error when casting */
|
||||||
|
|
||||||
|
if (player->seek_ticks >= 0) {
|
||||||
|
fluid_synth_all_sounds_off(synth, -1); /* avoid hanging notes */
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < player->ntracks; i++) {
|
for (i = 0; i < player->ntracks; i++) {
|
||||||
if (!fluid_track_eot(player->track[i])) {
|
if (!fluid_track_eot(player->track[i])) {
|
||||||
status = FLUID_PLAYER_PLAYING;
|
status = FLUID_PLAYER_PLAYING;
|
||||||
|
|
Loading…
Reference in a new issue