summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Somerville <bill@classdesign.com>2013-08-24 20:51:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 12:08:30 +0200
commit4715ec52b17a220c48a380a2cd1619ad5fb069a7 (patch)
treefab658c1a7222cad2587d72fe48b21f35116a02b
parent13a53a505640aebd2b10c0c52977650c797678ad (diff)
downloadqtmultimedia-old/5.1.tar.gz
Fix QAudioOutput::setVolume() limited 50% on 32-bit Windowsold/5.1
A signed 16 bit integer was being used to pack a normalised double into half of a DWORD. It needed to be unsigned 16-bit to get the full range of the Windows volume control. Task-number: QTBUG-33160 Change-Id: Ic17f572a188401ee686c6e6af3984d52328ccda6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index 4d13d4349..286cecba7 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -702,7 +702,7 @@ void QAudioOutputPrivate::setVolume(qreal v)
volumeCache = normalizedVolume;
return;
}
- const qint16 scaled = normalizedVolume * 0xFFFF;
+ const quint16 scaled = normalizedVolume * 0xFFFF;
DWORD vol = MAKELONG(scaled, scaled);
MMRESULT res = waveOutSetVolume(hWaveOut, vol);
if (res == MMSYSERR_NOERROR)