[AUDIO] Implement volume control support (#6922)

Implement volume level changing for Aux/MidiOut/WaveOut devices. It's represented the following WINMM functions:
- auxGetVolume,
- auxSetVolume,
- midiOutGetVolume,
- midiOutSetVolume,
- waveOutGetVolume,
- waveOutSetVolume,
which are calling the followind messages appropriately:
- AUXDM_GETVOLUME,
- AUXDM_SETVOLUME,
- MODM_GETVOLUME,
- MODM_SETVOLUME,
- WODM_GETVOLUME,
- WODM_SETVOLUME.
This fixes volume control for several 3rd-party programs (like Fox Audio Player 0.10.2 from Rapps, Winamp 2.95 with WaveOut plugin). However it does not fix changing the volume in system volume mixers (SndVol32, MMSys), since they are using their own functionality instead. They technically do the same things, but apart from the functions mentioned above.
CORE-14780
This commit is contained in:
Oleg Dubinskiy 2024-06-01 12:30:33 +02:00 committed by GitHub
parent e1db293f12
commit 9046cc97ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 323 additions and 0 deletions

View file

@ -75,6 +75,23 @@ modMessage(
break;
}
case MODM_GETVOLUME:
{
Result = MmeGetVolume(MIDI_OUT_DEVICE_TYPE,
DeviceId,
PrivateHandle,
Parameter1);
break;
}
case MODM_SETVOLUME:
{
Result = MmeSetVolume(MIDI_OUT_DEVICE_TYPE,
DeviceId,
PrivateHandle,
Parameter1);
break;
}
}
SND_TRACE(L"modMessage returning MMRESULT %d\n", Result);