Skip to content

Commit

Permalink
release all notes when seeking/stopping player
Browse files Browse the repository at this point in the history
avoids hanging notes, even when sustain pedal is depressed
  • Loading branch information
albedozero authored Sep 15, 2021
1 parent 03c07c4 commit 0395e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/midi/fluid_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ fluid_player_callback(void *data, unsigned int msec)
{
for(i = 0; i < MAX_NUMBER_OF_CHANNELS; i++)
{
fluid_synth_all_notes_off(synth, player->notesoff_channels[i]);
fluid_synth_all_notes_release(synth, player->notesoff_channels[i]);
if(player->notesoff_channels[i] < 0)
{
break;
Expand Down Expand Up @@ -2135,7 +2135,7 @@ fluid_player_callback(void *data, unsigned int msec)
{
for(i = 0; i < MAX_NUMBER_OF_CHANNELS; i++)
{
fluid_synth_all_notes_off(synth, player->notesoff_channels[i]);
fluid_synth_all_notes_release(synth, player->notesoff_channels[i]);
if(player->notesoff_channels[i] < 0)
{
break;
Expand Down

0 comments on commit 0395e91

Please sign in to comment.