win32: WaveOut: Correct volume setting.

This commit is contained in:
Brandon Wright 2019-02-12 22:32:53 -06:00
parent 35eb5e550b
commit cf3feb24ac

View File

@ -75,7 +75,8 @@ bool CWaveOut::SetupSound()
void CWaveOut::SetVolume(double volume) void CWaveOut::SetVolume(double volume)
{ {
waveOutSetVolume(hWaveOut, (DWORD)(volume * 0xffffffff)); uint32 volumeout = volume * 0xffff;
waveOutSetVolume(hWaveOut, volumeout + (volumeout << 16);
} }
void CWaveOut::BeginPlayback() void CWaveOut::BeginPlayback()