Mercurial > hg > svapp
comparison audio/AudioRecordTarget.h @ 477:411e019474e5 recording
OK, we can record -- sort of
author | Chris Cannam |
---|---|
date | Tue, 18 Aug 2015 16:47:54 +0100 |
parents | f4d1fa41b94b |
children | 493f2af85497 |
comparison
equal
deleted
inserted
replaced
476:f4d1fa41b94b | 477:411e019474e5 |
---|---|
23 #include <QMutex> | 23 #include <QMutex> |
24 | 24 |
25 #include "base/BaseTypes.h" | 25 #include "base/BaseTypes.h" |
26 | 26 |
27 class ViewManagerBase; | 27 class ViewManagerBase; |
28 class WavFileWriter; | 28 class WritableWaveFileModel; |
29 | 29 |
30 class AudioRecordTarget : public QObject, | 30 class AudioRecordTarget : public QObject, |
31 public breakfastquay::ApplicationRecordTarget | 31 public breakfastquay::ApplicationRecordTarget |
32 { | 32 { |
33 Q_OBJECT | 33 Q_OBJECT |
49 | 49 |
50 virtual void setInputLevels(float peakLeft, float peakRight); | 50 virtual void setInputLevels(float peakLeft, float peakRight); |
51 | 51 |
52 virtual void audioProcessingOverload() { } | 52 virtual void audioProcessingOverload() { } |
53 | 53 |
54 QString startRecording(); // and return the audio filename | 54 bool isRecording() const { return m_recording; } |
55 WritableWaveFileModel *startRecording(); // caller takes ownership | |
55 void stopRecording(); | 56 void stopRecording(); |
57 | |
58 signals: | |
59 void recordStatusChanged(bool recording); | |
60 | |
61 protected slots: | |
62 void modelAboutToBeDeleted(); | |
56 | 63 |
57 private: | 64 private: |
58 ViewManagerBase *m_viewManager; | 65 ViewManagerBase *m_viewManager; |
59 std::string m_clientName; | 66 std::string m_clientName; |
60 bool m_recording; | 67 bool m_recording; |
61 sv_samplerate_t m_recordSampleRate; | 68 sv_samplerate_t m_recordSampleRate; |
62 QString m_audioFileName; | 69 QString m_audioFileName; |
63 WavFileWriter *m_writer; | 70 WritableWaveFileModel *m_model; |
64 QMutex m_mutex; | 71 QMutex m_mutex; |
65 }; | 72 }; |
66 | 73 |
67 #endif | 74 #endif |