Mercurial > hg > svapp
comparison 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 |
comparison
equal
deleted
inserted
replaced
474:fdce8a452b19 | 475:f93820d36cb0 |
---|---|
44 class Overview; | 44 class Overview; |
45 class Layer; | 45 class Layer; |
46 class WaveformLayer; | 46 class WaveformLayer; |
47 class WaveFileModel; | 47 class WaveFileModel; |
48 class AudioCallbackPlaySource; | 48 class AudioCallbackPlaySource; |
49 class AudioRecordTarget; | |
49 class CommandHistory; | 50 class CommandHistory; |
50 class QMenu; | 51 class QMenu; |
51 class AudioDial; | 52 class AudioDial; |
52 class QLabel; | 53 class QLabel; |
53 class QCheckBox; | 54 class QCheckBox; |
62 class QSignalMapper; | 63 class QSignalMapper; |
63 class QShortcut; | 64 class QShortcut; |
64 | 65 |
65 namespace breakfastquay { | 66 namespace breakfastquay { |
66 class SystemPlaybackTarget; | 67 class SystemPlaybackTarget; |
68 class SystemAudioIO; | |
67 } | 69 } |
68 | 70 |
69 /** | 71 /** |
70 * The base class for the SV main window. This includes everything to | 72 * The base class for the SV main window. This includes everything to |
71 * do with general document and pane stack management, but nothing | 73 * do with general document and pane stack management, but nothing |
78 class MainWindowBase : public QMainWindow, public FrameTimer | 80 class MainWindowBase : public QMainWindow, public FrameTimer |
79 { | 81 { |
80 Q_OBJECT | 82 Q_OBJECT |
81 | 83 |
82 public: | 84 public: |
83 MainWindowBase(bool withAudioOutput, bool withMIDIInput); | 85 enum SoundOption { |
86 WithAudioOutput = 0x01, | |
87 WithAudioInput = 0x02, | |
88 WithMIDIInput = 0x04, | |
89 WithEverything = 0xff | |
90 }; | |
91 typedef int SoundOptions; | |
92 | |
93 MainWindowBase(SoundOptions options = WithEverything); | |
84 virtual ~MainWindowBase(); | 94 virtual ~MainWindowBase(); |
85 | 95 |
86 enum AudioFileOpenMode { | 96 enum AudioFileOpenMode { |
87 ReplaceSession, | 97 ReplaceSession, |
88 ReplaceMainModel, | 98 ReplaceMainModel, |
147 void canRenumberInstants(bool); | 157 void canRenumberInstants(bool); |
148 void canDeleteCurrentLayer(bool); | 158 void canDeleteCurrentLayer(bool); |
149 void canZoom(bool); | 159 void canZoom(bool); |
150 void canScroll(bool); | 160 void canScroll(bool); |
151 void canPlay(bool); | 161 void canPlay(bool); |
162 void canRecord(bool); | |
152 void canFfwd(bool); | 163 void canFfwd(bool); |
153 void canRewind(bool); | 164 void canRewind(bool); |
154 void canPlaySelection(bool); | 165 void canPlaySelection(bool); |
155 void canSpeedUpPlayback(bool); | 166 void canSpeedUpPlayback(bool); |
156 void canSlowDownPlayback(bool); | 167 void canSlowDownPlayback(bool); |
305 | 316 |
306 PaneStack *m_paneStack; | 317 PaneStack *m_paneStack; |
307 ViewManager *m_viewManager; | 318 ViewManager *m_viewManager; |
308 Layer *m_timeRulerLayer; | 319 Layer *m_timeRulerLayer; |
309 | 320 |
310 bool m_audioOutput; | 321 SoundOptions m_soundOptions; |
322 | |
311 AudioCallbackPlaySource *m_playSource; | 323 AudioCallbackPlaySource *m_playSource; |
312 breakfastquay::SystemPlaybackTarget *m_playTarget; | 324 AudioRecordTarget *m_recordTarget; |
325 breakfastquay::SystemPlaybackTarget *m_playTarget; // only one of this... | |
326 breakfastquay::SystemAudioIO *m_audioIO; // ... and this exists | |
313 | 327 |
314 class OSCQueueStarter : public QThread | 328 class OSCQueueStarter : public QThread |
315 { | 329 { |
316 public: | 330 public: |
317 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { } | 331 OSCQueueStarter(MainWindowBase *mwb) : QThread(mwb), m_mwb(mwb) { } |
422 virtual void registerLastOpenedFilePath(FileFinder::FileType type, QString path); | 436 virtual void registerLastOpenedFilePath(FileFinder::FileType type, QString path); |
423 | 437 |
424 virtual QString getDefaultSessionTemplate() const; | 438 virtual QString getDefaultSessionTemplate() const; |
425 virtual void setDefaultSessionTemplate(QString); | 439 virtual void setDefaultSessionTemplate(QString); |
426 | 440 |
427 virtual void createPlayTarget(); | 441 virtual void createAudioIO(); |
428 virtual void openHelpUrl(QString url); | 442 virtual void openHelpUrl(QString url); |
429 | 443 |
430 virtual void setupMenus() = 0; | 444 virtual void setupMenus() = 0; |
431 virtual void updateVisibleRangeDisplay(Pane *p) const = 0; | 445 virtual void updateVisibleRangeDisplay(Pane *p) const = 0; |
432 virtual void updatePositionStatusDisplays() const = 0; | 446 virtual void updatePositionStatusDisplays() const = 0; |