Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
PortMidi: Clean up "reset all controllers"
Browse files Browse the repository at this point in the history
  • Loading branch information
ceski-1 committed Jun 13, 2023
1 parent 66ec4e8 commit a13e885
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions prboom2/src/MUSIC/portmidiplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,6 @@ static void pm_render (void *vdest, unsigned bufflen)
{
writeevent (when, 0xB0, i, 0x7B, 0x00); // all notes off
writeevent (when, 0xB0, i, 0x79, 0x00); // reset all controllers
write_volume (when, i, channel_volume[i]); // reapply volume
}
continue;
}
Expand All @@ -654,9 +653,8 @@ static void pm_render (void *vdest, unsigned bufflen)
}
else if (currevent->data.channel.param1 == 0x79)
{
int i = currevent->data.channel.channel;
writeevent (when, 0xB0, i, 0x79, 0x00); // reset all controllers
write_volume (when, i, channel_volume[i]); // reapply volume
// ms gs synth resets volume if "reset all controllers" value isn't zero
writeevent (when, 0xB0, currevent->data.channel.channel, 0x79, 0x00);
break;
}
// fall through
Expand Down

0 comments on commit a13e885

Please sign in to comment.