diff framework/MainWindowBase.h @ 475:f93820d36cb0 recording

Start stubbing in audio record
author Chris Cannam
date Tue, 18 Aug 2015 14:04:47 +0100
parents 56acd9368532
children 411e019474e5
line wrap: on
line diff
--- a/framework/MainWindowBase.h	Wed Aug 05 17:47:12 2015 +0100
+++ b/framework/MainWindowBase.h	Tue Aug 18 14:04:47 2015 +0100
@@ -46,6 +46,7 @@
 class WaveformLayer;
 class WaveFileModel;
 class AudioCallbackPlaySource;
+class AudioRecordTarget;
 class CommandHistory;
 class QMenu;
 class AudioDial;
@@ -64,6 +65,7 @@
 
 namespace breakfastquay {
 class SystemPlaybackTarget;
+class SystemAudioIO;
 }
 
 /**
@@ -80,7 +82,15 @@
     Q_OBJECT
 
 public:
-    MainWindowBase(bool withAudioOutput, bool withMIDIInput);
+    enum SoundOption {
+        WithAudioOutput = 0x01,
+        WithAudioInput  = 0x02,
+        WithMIDIInput   = 0x04,
+        WithEverything  = 0xff
+    };
+    typedef int SoundOptions;
+    
+    MainWindowBase(SoundOptions options = WithEverything);
     virtual ~MainWindowBase();
     
     enum AudioFileOpenMode {
@@ -149,6 +159,7 @@
     void canZoom(bool);
     void canScroll(bool);
     void canPlay(bool);
+    void canRecord(bool);
     void canFfwd(bool);
     void canRewind(bool);
     void canPlaySelection(bool);
@@ -307,9 +318,12 @@
     ViewManager             *m_viewManager;
     Layer                   *m_timeRulerLayer;
 
-    bool                     m_audioOutput;
+    SoundOptions             m_soundOptions;
+
     AudioCallbackPlaySource *m_playSource;
-    breakfastquay::SystemPlaybackTarget *m_playTarget;
+    AudioRecordTarget       *m_recordTarget;
+    breakfastquay::SystemPlaybackTarget *m_playTarget; // only one of this...
+    breakfastquay::SystemAudioIO *m_audioIO;           // ... and this exists
 
     class OSCQueueStarter : public QThread
     {
@@ -424,7 +438,7 @@
     virtual QString getDefaultSessionTemplate() const;
     virtual void setDefaultSessionTemplate(QString);
 
-    virtual void createPlayTarget();
+    virtual void createAudioIO();
     virtual void openHelpUrl(QString url);
 
     virtual void setupMenus() = 0;