comparison view/ViewManager.h @ 301:5636eeacc467

* Merge from sv-match-alignment branch (excluding alignment-specific document). - add aggregate wave model (not yet complete enough to be added as a true model in a layer, but there's potential) - add play solo mode - add alignment model -- unused in plain SV - fix two plugin leaks - add m3u playlist support (opens all files at once, potentially hazardous) - fix retrieval of pre-encoded URLs - add ability to resample audio files on import, so as to match rates with other files previously loaded; add preference for same - add preliminary support in transform code for range and rate of transform input - reorganise preferences dialog, move dark-background option to preferences, add option for temporary directory location
author Chris Cannam
date Fri, 28 Sep 2007 13:56:38 +0000
parents 24fc90078754
children 7b96a3261e1c
comparison
equal deleted inserted replaced
300:0824a754a8eb 301:5636eeacc467
63 unsigned long getGlobalZoom() const; 63 unsigned long getGlobalZoom() const;
64 64
65 unsigned long getPlaybackFrame() const; 65 unsigned long getPlaybackFrame() const;
66 void setPlaybackFrame(unsigned long frame); 66 void setPlaybackFrame(unsigned long frame);
67 67
68 // Only meaningful in solo mode, and used for optional alignment feature
69 Model *getPlaybackModel() const;
70 void setPlaybackModel(Model *);
71
68 bool haveInProgressSelection() const; 72 bool haveInProgressSelection() const;
69 const Selection &getInProgressSelection(bool &exclusive) const; 73 const Selection &getInProgressSelection(bool &exclusive) const;
70 void setInProgressSelection(const Selection &selection, bool exclusive); 74 void setInProgressSelection(const Selection &selection, bool exclusive);
71 void clearInProgressSelection(); 75 void clearInProgressSelection();
72 76
103 void setPlayLoopMode(bool on); 107 void setPlayLoopMode(bool on);
104 108
105 bool getPlaySelectionMode() const { return m_playSelectionMode; } 109 bool getPlaySelectionMode() const { return m_playSelectionMode; }
106 void setPlaySelectionMode(bool on); 110 void setPlaySelectionMode(bool on);
107 111
112 bool getPlaySoloMode() const { return m_playSoloMode; }
113 void setPlaySoloMode(bool on);
114
108 /** 115 /**
109 * The sample rate that is used for playback. This is usually the 116 * The sample rate that is used for playback. This is usually the
110 * rate of the main model, but not always. Models whose rates 117 * rate of the main model, but not always. Models whose rates
111 * differ from this will play back at the wrong speed -- there is 118 * differ from this will play back at the wrong speed -- there is
112 * no per-model resampler. 119 * no per-model resampler.
197 204
198 /** Emitted when the play selection mode has been changed. */ 205 /** Emitted when the play selection mode has been changed. */
199 void playSelectionModeChanged(); 206 void playSelectionModeChanged();
200 void playSelectionModeChanged(bool); 207 void playSelectionModeChanged(bool);
201 208
209 /** Emitted when the play solo mode has been changed. */
210 void playSoloModeChanged();
211 void playSoloModeChanged(bool);
212
202 /** Emitted when the overlay mode has been changed. */ 213 /** Emitted when the overlay mode has been changed. */
203 void overlayModeChanged(); 214 void overlayModeChanged();
204 215
205 /** Emitted when the zoom wheels have been toggled. */ 216 /** Emitted when the zoom wheels have been toggled. */
206 void zoomWheelsEnabledChanged(); 217 void zoomWheelsEnabledChanged();
218 protected: 229 protected:
219 AudioPlaySource *m_playSource; 230 AudioPlaySource *m_playSource;
220 unsigned long m_globalCentreFrame; 231 unsigned long m_globalCentreFrame;
221 unsigned long m_globalZoom; 232 unsigned long m_globalZoom;
222 mutable unsigned long m_playbackFrame; 233 mutable unsigned long m_playbackFrame;
234 Model *m_playbackModel; //!!!
223 size_t m_mainModelSampleRate; 235 size_t m_mainModelSampleRate;
224 236
225 float m_lastLeft; 237 float m_lastLeft;
226 float m_lastRight; 238 float m_lastRight;
227 239
233 245
234 ToolMode m_toolMode; 246 ToolMode m_toolMode;
235 247
236 bool m_playLoopMode; 248 bool m_playLoopMode;
237 bool m_playSelectionMode; 249 bool m_playSelectionMode;
250 bool m_playSoloMode;
238 251
239 void setSelections(const MultiSelection &ms); 252 void setSelections(const MultiSelection &ms);
240 void signalSelectionChange(); 253 void signalSelectionChange();
241 254
242 class SetSelectionCommand : public Command 255 class SetSelectionCommand : public Command