Undo music volume slider changes (#737)

This commit is contained in:
ceski 2022-09-18 22:11:17 -07:00 committed by GitHub
parent 669d23ed04
commit cda1560d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,10 +140,6 @@ static void FillBuffer(void)
channel_volume[MIDIEVENT_CHANNEL(event->dwEvent)] = volume;
volume *= volume_factor;
if (volume > 127)
{
volume = 127;
}
event->dwEvent = (event->dwEvent & 0xFF00FFFF) |
((volume & 0x7F) << 16);
@ -447,10 +443,6 @@ static void UpdateVolume()
DWORD msg = 0;
int value = channel_volume[i] * volume_factor;
if (value > 127)
{
value = 127;
}
msg = MIDI_EVENT_CONTROLLER | i | (MIDI_CONTROLLER_MAIN_VOLUME << 8) |
(value << 16);
@ -461,7 +453,7 @@ static void UpdateVolume()
static void I_WIN_SetMusicVolume(int volume)
{
volume_factor = (float)volume * 8 / 100;
volume_factor = (float)volume / 15;
UpdateVolume();
}