diff options
author | Michael Goddard <michael.goddard@nokia.com> | 2012-01-25 13:50:37 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-25 07:18:48 +0100 |
commit | 3b00730ecaeb4f780b897c3f0683c1d449e7c6c7 (patch) | |
tree | 66fd49c3bf021e4199935d7ab1fcc096ab24fd24 /src/multimedia/audio/qaudioinput.cpp | |
parent | 8aef60c1cf3897053a68498db414b91c00eec0fa (diff) | |
download | qtmultimedia-3b00730ecaeb4f780b897c3f0683c1d449e7c6c7.tar.gz |
Add a volume (gain) property to QAudioInput.
Only implemented for PulseAudio so far, but the API does explain that
it's optional.
Change-Id: I4543a1c81d810fe92bb08f1ed13f3a3534a371e4
Reviewed-by: Ling Hu <ling.hu@nokia.com>
Diffstat (limited to 'src/multimedia/audio/qaudioinput.cpp')
-rw-r--r-- | src/multimedia/audio/qaudioinput.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp index a41e43584..abe9bb34b 100644 --- a/src/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput.cpp @@ -327,6 +327,29 @@ int QAudioInput::notifyInterval() const } /*! + Sets the input volume to \a volume. + + If the device does not support adjusting the input + volume then \a volume will be ignored and the input + volume will remain at 1.0. +*/ +void QAudioInput::setVolume(qreal volume) +{ + d->setVolume(volume); +} + +/*! + Returns the input volume (gain). + + If the device does not support adjusting the input volume + the returned value will be 1.0. +*/ +qreal QAudioInput::volume() const +{ + return d->volume(); +} + +/*! Returns the amount of audio data processed since start() was called in microseconds. */ |