From cf3feb24ac65f399bbcc639422703290126d776e Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 12 Feb 2019 22:32:53 -0600 Subject: [PATCH] win32: WaveOut: Correct volume setting. --- win32/CWaveOut.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win32/CWaveOut.cpp b/win32/CWaveOut.cpp index a1765905..8a27f104 100644 --- a/win32/CWaveOut.cpp +++ b/win32/CWaveOut.cpp @@ -75,7 +75,8 @@ bool CWaveOut::SetupSound() void CWaveOut::SetVolume(double volume) { - waveOutSetVolume(hWaveOut, (DWORD)(volume * 0xffffffff)); + uint32 volumeout = volume * 0xffff; + waveOutSetVolume(hWaveOut, volumeout + (volumeout << 16); } void CWaveOut::BeginPlayback()