summaryrefslogtreecommitdiff
path: root/src/multimedia/audio/qaudiooutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudiooutput.cpp')
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index 670dca7bc..e37da9bdf 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -364,7 +364,8 @@ QAudio::State QAudioOutput::state() const
*/
void QAudioOutput::setVolume(qreal volume)
{
- d->setVolume(volume);
+ qreal v = qBound(qreal(0.0), volume, qreal(1.0));
+ d->setVolume(v);
}
/*!