diff 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
line wrap: on
line diff
--- a/audio/AudioRecordTarget.h	Tue Aug 18 15:00:34 2015 +0100
+++ b/audio/AudioRecordTarget.h	Tue Aug 18 16:47:54 2015 +0100
@@ -25,7 +25,7 @@
 #include "base/BaseTypes.h"
 
 class ViewManagerBase;
-class WavFileWriter;
+class WritableWaveFileModel;
 
 class AudioRecordTarget : public QObject,
 			  public breakfastquay::ApplicationRecordTarget
@@ -51,8 +51,15 @@
 
     virtual void audioProcessingOverload() { }
 
-    QString startRecording(); // and return the audio filename
+    bool isRecording() const { return m_recording; }
+    WritableWaveFileModel *startRecording(); // caller takes ownership
     void stopRecording();
+
+signals:
+    void recordStatusChanged(bool recording);
+
+protected slots:
+    void modelAboutToBeDeleted();
     
 private:
     ViewManagerBase *m_viewManager;
@@ -60,7 +67,7 @@
     bool m_recording;
     sv_samplerate_t m_recordSampleRate;
     QString m_audioFileName;
-    WavFileWriter *m_writer;
+    WritableWaveFileModel *m_model;
     QMutex m_mutex;
 };