Mercurial > hg > svgui
comparison view/ViewManager.h @ 1216:dc2af6616c83
Merge from branch 3.0-integration
author | Chris Cannam |
---|---|
date | Fri, 13 Jan 2017 10:29:50 +0000 |
parents | efc7586de499 |
children | a34a2a25907c |
comparison
equal
deleted
inserted
replaced
1048:e8102ff5573b | 1216:dc2af6616c83 |
---|---|
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 |
170 sv_samplerate_t getPlaybackSampleRate() const; | 173 sv_samplerate_t getPlaybackSampleRate() const; |
171 | 174 |
172 /** | 175 /** |
173 * The sample rate of the audio output device. If the playback | 176 * The sample rate of the audio output device. If the playback |
174 * sample rate differs from this, everything will be resampled at | 177 * sample rate differs from this, everything will be resampled at |
175 * the output stage. | 178 * the output stage (but not before). |
176 */ | 179 */ |
177 sv_samplerate_t getOutputSampleRate() const; | 180 sv_samplerate_t getDeviceSampleRate() const; |
178 | 181 |
179 /** | 182 /** |
180 * The sample rate of the current main model. This may in theory | 183 * The sample rate of the current main model. This may in theory |
181 * differ from the playback sample rate, in which case even the | 184 * differ from the playback sample rate, in which case even the |
182 * main model will play at the wrong speed. | 185 * main model will play at the wrong speed. |
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; |