diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2013-10-04 17:02:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-09 18:01:52 +0200 |
commit | a1cd3c9274789a8735bf5c02094c5c4034992aa6 (patch) | |
tree | 962a8de6c4d0ebc2294ed6f4a458484983f2eb14 /examples/multimedia/audiorecorder/audiorecorder.h | |
parent | 7c9ff56f2f828410efee049ae01e712dc24aaa77 (diff) |
Improve audiorecorder example.
- Possibility to select channel count
- Show audio level for unsigned integer samples
- Show audio level for each channel
- Correctly set output file location
- Update controls depending on the recorder status (rather than the state)
Change-Id: Ieb08c379bb01a11ce1aa52a9d92ea1f320c87d49
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'examples/multimedia/audiorecorder/audiorecorder.h')
-rw-r--r-- | examples/multimedia/audiorecorder/audiorecorder.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/multimedia/audiorecorder/audiorecorder.h b/examples/multimedia/audiorecorder/audiorecorder.h index 1a12031ec..2c0a1e5ed 100644 --- a/examples/multimedia/audiorecorder/audiorecorder.h +++ b/examples/multimedia/audiorecorder/audiorecorder.h @@ -52,6 +52,8 @@ class QAudioProbe; class QAudioBuffer; QT_END_NAMESPACE +class QAudioLevel; + class AudioRecorder : public QMainWindow { Q_OBJECT @@ -68,15 +70,18 @@ private slots: void togglePause(); void toggleRecord(); - void updateState(QMediaRecorder::State); + void updateStatus(QMediaRecorder::Status); void updateProgress(qint64 pos); void displayErrorMessage(); private: + void clearAudioLevels(); + Ui::AudioRecorder *ui; QAudioRecorder *audioRecorder; QAudioProbe *probe; + QList<QAudioLevel*> audioLevels; bool outputLocationSet; }; |