Clamp volume in QMediaRecorder and QSoundEffect

Change-Id: Ie61c33592873b7e5a2ed1b8ccf3386b20edb2cef
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
This commit is contained in:
Yoann Lopes
2016-07-08 15:28:34 +02:00
parent 81a48edb54
commit 91d12e6242
2 changed files with 4 additions and 6 deletions

View File

@@ -563,8 +563,10 @@ void QMediaRecorder::setVolume(qreal volume)
{
Q_D(QMediaRecorder);
if (d->control)
if (d->control) {
volume = qMax(qreal(0.0), volume);
d->control->setVolume(volume);
}
}
/*!