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
@@ -57,6 +57,7 @@ public:
|
||||
m_status(QMediaRecorder::LoadedStatus),
|
||||
m_position(0),
|
||||
m_muted(false),
|
||||
m_volume(1.0),
|
||||
m_settingAppliedCount(0)
|
||||
{
|
||||
}
|
||||
@@ -92,6 +93,11 @@ public:
|
||||
return m_muted;
|
||||
}
|
||||
|
||||
qreal volume() const
|
||||
{
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
void applySettings()
|
||||
{
|
||||
m_settingAppliedCount++;
|
||||
@@ -152,12 +158,19 @@ public slots:
|
||||
emit mutedChanged(m_muted = muted);
|
||||
}
|
||||
|
||||
void setVolume(qreal volume)
|
||||
{
|
||||
if (!qFuzzyCompare(m_volume, volume))
|
||||
emit volumeChanged(m_volume = volume);
|
||||
}
|
||||
|
||||
public:
|
||||
QUrl m_sink;
|
||||
QMediaRecorder::State m_state;
|
||||
QMediaRecorder::Status m_status;
|
||||
qint64 m_position;
|
||||
bool m_muted;
|
||||
qreal m_volume;
|
||||
int m_settingAppliedCount;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user