comparison view/ViewManager.h @ 1210:efc7586de499 3.0-integration

Wire up record monitoring
author Chris Cannam
date Wed, 04 Jan 2017 16:03:12 +0000
parents e0ac21f07ab0
children a34a2a25907c
comparison
equal deleted inserted replaced
1209:f7bb22999d2e 1210:efc7586de499
27 #include "base/Command.h" 27 #include "base/Command.h"
28 #include "base/Clipboard.h" 28 #include "base/Clipboard.h"
29 #include "base/BaseTypes.h" 29 #include "base/BaseTypes.h"
30 30
31 class AudioPlaySource; 31 class AudioPlaySource;
32 class AudioRecordTarget;
32 class Model; 33 class Model;
33 34
34 enum PlaybackFollowMode { 35 enum PlaybackFollowMode {
35 36
36 /** 37 /**
78 public: 79 public:
79 ViewManager(); 80 ViewManager();
80 virtual ~ViewManager(); 81 virtual ~ViewManager();
81 82
82 void setAudioPlaySource(AudioPlaySource *source); 83 void setAudioPlaySource(AudioPlaySource *source);
84 void setAudioRecordTarget(AudioRecordTarget *target);
83 85
84 bool isPlaying() const; 86 bool isPlaying() const;
87 bool isRecording() const;
85 88
86 sv_frame_t getGlobalCentreFrame() const; // the set method is a slot 89 sv_frame_t getGlobalCentreFrame() const; // the set method is a slot
87 int getGlobalZoom() const; 90 int getGlobalZoom() const;
88 91
89 sv_frame_t getPlaybackFrame() const; // the set method is a slot 92 sv_frame_t getPlaybackFrame() const; // the set method is a slot
252 void viewZoomLevelChanged(View *v, int zoom, bool locked); 255 void viewZoomLevelChanged(View *v, int zoom, bool locked);
253 256
254 /** Emitted when the playback frame changes. */ 257 /** Emitted when the playback frame changes. */
255 void playbackFrameChanged(sv_frame_t frame); 258 void playbackFrameChanged(sv_frame_t frame);
256 259
257 /** Emitted when the output levels change. Values in range 0.0 -> 1.0. */ 260 /** Emitted when the output or record levels change. Values in range 0.0 -> 1.0. */
258 void outputLevelsChanged(float left, float right); 261 void monitoringLevelsChanged(float left, float right);
259 262
260 /** Emitted whenever the selection has changed. */ 263 /** Emitted whenever the selection has changed. */
261 void selectionChanged(); 264 void selectionChanged();
262 265
263 /** Emitted when the selection has been changed through an 266 /** Emitted when the selection has been changed through an
303 void viewCentreFrameChanged(sv_frame_t, bool, PlaybackFollowMode); 306 void viewCentreFrameChanged(sv_frame_t, bool, PlaybackFollowMode);
304 void viewZoomLevelChanged(int, bool); 307 void viewZoomLevelChanged(int, bool);
305 void setGlobalCentreFrame(sv_frame_t); 308 void setGlobalCentreFrame(sv_frame_t);
306 void setPlaybackFrame(sv_frame_t); 309 void setPlaybackFrame(sv_frame_t);
307 void playStatusChanged(bool playing); 310 void playStatusChanged(bool playing);
311 void recordStatusChanged(bool recording);
308 312
309 protected slots: 313 protected slots:
310 void checkPlayStatus(); 314 void checkPlayStatus();
311 void seek(sv_frame_t); 315 void seek(sv_frame_t);
312 //!!! void considerZoomChange(void *, int, bool); 316 //!!! void considerZoomChange(void *, int, bool);
313 317
314 protected: 318 protected:
315 AudioPlaySource *m_playSource; 319 AudioPlaySource *m_playSource;
320 AudioRecordTarget *m_recordTarget;
321
316 sv_frame_t m_globalCentreFrame; 322 sv_frame_t m_globalCentreFrame;
317 int m_globalZoom; 323 int m_globalZoom;
318 mutable sv_frame_t m_playbackFrame; 324 mutable sv_frame_t m_playbackFrame;
319 Model *m_playbackModel; //!!! 325 Model *m_playbackModel; //!!!
320 sv_samplerate_t m_mainModelSampleRate; 326 sv_samplerate_t m_mainModelSampleRate;