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>
This commit is contained in:
Michael Goddard
2012-01-25 13:50:37 +10:00
committed by Qt by Nokia
parent 8aef60c1cf
commit 3b00730eca
8 changed files with 181 additions and 0 deletions

View File

@@ -326,6 +326,29 @@ int QAudioInput::notifyInterval() const
return d->notifyInterval();
}
/*!
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.