Added volume property to QMediaRecorder
Change-Id: I19f727107651c9f640ca1c010a3764f05aef8820 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
0d0e89b1e8
commit
36ff2fe85e
@@ -285,6 +285,9 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
|
||||
disconnect(d->control, SIGNAL(mutedChanged(bool)),
|
||||
this, SIGNAL(mutedChanged(bool)));
|
||||
|
||||
disconnect(d->control, SIGNAL(volumeChanged(qreal)),
|
||||
this, SIGNAL(volumeChanged(qreal)));
|
||||
|
||||
disconnect(d->control, SIGNAL(durationChanged(qint64)),
|
||||
this, SIGNAL(durationChanged(qint64)));
|
||||
|
||||
@@ -388,6 +391,9 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
|
||||
connect(d->control, SIGNAL(mutedChanged(bool)),
|
||||
this, SIGNAL(mutedChanged(bool)));
|
||||
|
||||
connect(d->control, SIGNAL(volumeChanged(qreal)),
|
||||
this, SIGNAL(volumeChanged(qreal)));
|
||||
|
||||
connect(d->control, SIGNAL(durationChanged(qint64)),
|
||||
this, SIGNAL(durationChanged(qint64)));
|
||||
|
||||
@@ -552,6 +558,26 @@ void QMediaRecorder::setMuted(bool muted)
|
||||
d->control->setMuted(muted);
|
||||
}
|
||||
|
||||
/*!
|
||||
\property QMediaRecorder::volume
|
||||
|
||||
\brief the linear audio gain of media recorder.
|
||||
*/
|
||||
|
||||
qreal QMediaRecorder::volume() const
|
||||
{
|
||||
return d_func()->control ? d_func()->control->volume() : 1.0;
|
||||
}
|
||||
|
||||
|
||||
void QMediaRecorder::setVolume(qreal volume)
|
||||
{
|
||||
Q_D(QMediaRecorder);
|
||||
|
||||
if (d->control)
|
||||
d->control->setVolume(volume);
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a list of supported container formats.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user