changeset 15:4d5d9aba406b

* Fix update and play limits for play-selection mode when not looping * Fix playback in loop mode when no selection -- but the GUI update for this is still wrong on the flyback * Various fixes and improvements to making selections, particularly during playback * Draw selection under non-opaque non-scrollable layers, so as to improve cacheing * Show selection limits as text when drawing selection * Allow user to find missing audio files when loading session * Cross-fade selections when in play-selection mode -- mostly. We don't cross-fade on a processing block boundary, and unfortunately with short selections the selection boundary is quite likely to coincide with a block boundary.
author Chris Cannam
date Wed, 25 Jan 2006 17:46:28 +0000
parents aa37f84ab70a
children 02a718909b2d
files layer/SpectrogramLayer.h widgets/Pane.cpp widgets/Panner.h
diffstat 3 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Tue Jan 24 16:20:58 2006 +0000
+++ b/layer/SpectrogramLayer.h	Wed Jan 25 17:46:28 2006 +0000
@@ -132,6 +132,8 @@
 	return PositionTop;
     }
 
+    virtual bool isLayerOpaque() const { return true; }
+
     virtual int getCompletion() const;
 
     virtual QString getPropertyContainerIconName() const { return "spectrogram"; }
--- a/widgets/Pane.cpp	Tue Jan 24 16:20:58 2006 +0000
+++ b/widgets/Pane.cpp	Wed Jan 25 17:46:28 2006 +0000
@@ -440,15 +440,20 @@
 	    m_manager->setInProgressSelection(Selection(min, max),
 					      !m_ctrlPressed);
 	}
-	
-	if (!m_manager || !m_manager->isPlaying()) {
+
+	bool doScroll = false;
+	if (!m_manager) doScroll = true;
+	if (!m_manager->isPlaying()) doScroll = true;
+	if (m_followPlay != PlaybackScrollContinuous) doScroll = true;
+
+	if (doScroll) {
 	    int offset = mouseFrame - getStartFrame();
 	    int available = getEndFrame() - getStartFrame();
-	    if (offset >= available * 0.9) {
-		int move = int(offset - available * 0.9) + 1;
+	    if (offset >= available * 0.95) {
+		int move = int(offset - available * 0.95) + 1;
 		setCentreFrame(m_centreFrame + move);
-	    } else if (offset <= available * 0.15) {
-		int move = int(available * 0.15 - offset) + 1;
+	    } else if (offset <= available * 0.10) {
+		int move = int(available * 0.10 - offset) + 1;
 		if (m_centreFrame > move) {
 		    setCentreFrame(m_centreFrame - move);
 		} else {
--- a/widgets/Panner.h	Tue Jan 24 16:20:58 2006 +0000
+++ b/widgets/Panner.h	Wed Jan 25 17:46:28 2006 +0000
@@ -46,6 +46,7 @@
     virtual void mousePressEvent(QMouseEvent *e);
     virtual void mouseReleaseEvent(QMouseEvent *e);
     virtual void mouseMoveEvent(QMouseEvent *e);
+    virtual bool shouldLabelSelections() const { return false; }
 
     QPoint m_clickPos;
     QPoint m_mousePos;