Implement volume in audiocapture plugin.
This plugin uses QAudioInput as audio source for the recording, just forward the volume to it. Change-Id: Ice3ec5e48195b13d5f738b79a357dfc261ad8955 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
@@ -96,11 +96,19 @@ public:
|
||||
|
||||
void setCaptureDevice(const QString &deviceName);
|
||||
|
||||
void setVolume(qreal v);
|
||||
qreal volume() const;
|
||||
|
||||
void setMuted(bool muted);
|
||||
bool isMuted() const;
|
||||
|
||||
signals:
|
||||
void stateChanged(QMediaRecorder::State state);
|
||||
void statusChanged(QMediaRecorder::Status status);
|
||||
void positionChanged(qint64 position);
|
||||
void actualLocationChanged(const QUrl &location);
|
||||
void volumeChanged(qreal volume);
|
||||
void mutedChanged(bool muted);
|
||||
void error(int error, const QString &errorString);
|
||||
|
||||
private slots:
|
||||
@@ -114,6 +122,8 @@ private:
|
||||
|
||||
void setStatus(QMediaRecorder::Status status);
|
||||
|
||||
void setVolumeHelper(qreal volume);
|
||||
|
||||
QDir defaultDir() const;
|
||||
QString generateFileName(const QString &requestedName,
|
||||
const QString &extension) const;
|
||||
@@ -129,6 +139,8 @@ private:
|
||||
QAudioDeviceInfo m_deviceInfo;
|
||||
QAudioFormat m_format;
|
||||
bool m_wavFile;
|
||||
qreal m_volume;
|
||||
bool m_muted;
|
||||
|
||||
// WAV header stuff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user