diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-11-16 16:04:28 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-11-23 11:48:37 +0000 |
commit | 9937c67decc5b81eaa25fff8d773cc7c2e6ff838 (patch) | |
tree | 70c2a8074cee87615e11bec74f689f9ced93daa5 /src/plugins/audiocapture/audiocapturesession.h | |
parent | 7221ed82d292fc20007b0d1a7953efd28fff3d22 (diff) | |
download | qtmultimedia-9937c67decc5b81eaa25fff8d773cc7c2e6ff838.tar.gz |
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>
Diffstat (limited to 'src/plugins/audiocapture/audiocapturesession.h')
-rw-r--r-- | src/plugins/audiocapture/audiocapturesession.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/audiocapture/audiocapturesession.h b/src/plugins/audiocapture/audiocapturesession.h index 188312905..da30053ad 100644 --- a/src/plugins/audiocapture/audiocapturesession.h +++ b/src/plugins/audiocapture/audiocapturesession.h @@ -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 |