diff options
Diffstat (limited to 'src/multimedia/audio/qsoundeffect.cpp')
-rw-r--r-- | src/multimedia/audio/qsoundeffect.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/multimedia/audio/qsoundeffect.cpp b/src/multimedia/audio/qsoundeffect.cpp index f653de86e..d3b818073 100644 --- a/src/multimedia/audio/qsoundeffect.cpp +++ b/src/multimedia/audio/qsoundeffect.cpp @@ -258,12 +258,22 @@ int QSoundEffect::loopsRemaining() const /*! \qmlproperty qreal QtMultimedia::SoundEffect::volume - This property holds the volume of the sound effect playback, from 0.0 (silent) to 1.0 (maximum volume). + This property holds the volume of the sound effect playback. + + The volume is scaled linearly from \c 0.0 (silence) to \c 1.0 (full volume). Values outside this + range will be clamped. + + The default volume is \c 1.0. + + UI volume controls should usually be scaled nonlinearly. For example, using a logarithmic scale + will produce linear changes in perceived loudness, which is what a user would normally expect + from a volume control. See \l {QtMultimedia::QtMultimedia::convertVolume()}{QtMultimedia.convertVolume()} + for more details. */ /*! \property QSoundEffect::volume - This property holds the volume of the sound effect playback, from 0.0 (silent) to 1.0 (maximum volume). + This property holds the volume of the sound effect playback, from 0.0 (silence) to 1.0 (full volume). */ /*! @@ -275,7 +285,16 @@ qreal QSoundEffect::volume() const } /*! - Sets the volume to play the sound effect at to \a volume, from 0.0 (silent) to 1.0 (maximum volume). + Sets the sound effect volume to \a volume. + + The volume is scaled linearly from \c 0.0 (silence) to \c 1.0 (full volume). Values outside this + range will be clamped. + + The default volume is \c 1.0. + + UI volume controls should usually be scaled nonlinearly. For example, using a logarithmic scale + will produce linear changes in perceived loudness, which is what a user would normally expect + from a volume control. See QAudio::convertVolume() for more details. */ void QSoundEffect::setVolume(qreal volume) { |