diff audioio/AudioGenerator.cpp @ 36:b9e76c9e631c

* Fix serious failure to reload "imported" (i.e. all non-derived non-main) models from .sv file * Give a short playback duration to notes with formal duration of 0 or 1 * Show crosshairs on spectrogram even when there is another layer on top (if it isn't opaque) * Always paste to the same time in the layer as the cut/copy was from, rather than to the playback pointer -- less flexible, but more predictable and less annoying. We probably need a way to get the old behaviour if pasting from somewhere else in the future (e.g. from a text file), but we can't do that yet anyway * Use a compound operation for dragging and resizing selections, so as to ensure a single undo operation works * Use a note model as the target for feature extraction plugins that output variable samplerate data with more than one value per feature * Avoid possible crashes in cut/paste if a layer proves to have no model
author Chris Cannam
date Thu, 11 May 2006 11:35:46 +0000
parents f6b15e0b6fde
children 58cf1620d6e3
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp	Mon May 08 16:44:47 2006 +0000
+++ b/audioio/AudioGenerator.cpp	Thu May 11 11:35:46 2006 +0000
@@ -700,6 +700,9 @@
 #endif
 	    
 	    size_t duration = pli->duration;
+            if (duration == 0 || duration == 1) {
+                duration = m_sourceSampleRate / 20;
+            }
 	    NoteOff noff;
 	    noff.pitch = onEv.data.note.note;
 	    noff.frame = pliFrame + duration;