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
@@ -98,6 +98,12 @@ bool AudioMediaRecorderControl::isMuted() const
|
||||
return false;
|
||||
}
|
||||
|
||||
qreal AudioMediaRecorderControl::volume() const
|
||||
{
|
||||
//TODO: implement muting and audio gain
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
void AudioMediaRecorderControl::setState(QMediaRecorder::State state)
|
||||
{
|
||||
if (m_state == state)
|
||||
@@ -124,6 +130,12 @@ void AudioMediaRecorderControl::setMuted(bool)
|
||||
{
|
||||
}
|
||||
|
||||
void AudioMediaRecorderControl::setVolume(qreal volume)
|
||||
{
|
||||
if (!qFuzzyCompare(volume, qreal(1.0)))
|
||||
qWarning() << "Media service doesn't support recorder audio gain.";
|
||||
}
|
||||
|
||||
void AudioMediaRecorderControl::updateStatus()
|
||||
{
|
||||
QMediaRecorder::Status newStatus = status();
|
||||
|
||||
@@ -67,12 +67,14 @@ public:
|
||||
qint64 duration() const;
|
||||
|
||||
bool isMuted() const;
|
||||
qreal volume() const;
|
||||
|
||||
void applySettings() {}
|
||||
|
||||
public slots:
|
||||
void setState(QMediaRecorder::State state);
|
||||
void setMuted(bool);
|
||||
void setVolume(qreal volume);
|
||||
|
||||
private slots:
|
||||
void updateStatus();
|
||||
|
||||
Reference in New Issue
Block a user