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

PortMidi Updates #576

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions prboom2/src/MUSIC/portmidiplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static int sysexbufflen;
// so the messages appear in the future. ~46-47ms is the nominal length if i_sound.c gets its way
#define DRIVER_LATENCY 80 // ms
// driver event buffer needs to be big enough to hold however many events occur in latency time
#define DRIVER_BUFFER 100 // events
#define DRIVER_BUFFER 1024 // events

static const char *pm_name (void)
{
Expand Down 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