diff audioio/AudioGenerator.cpp @ 184:ebd906049fb6

* Change WaveFileModel API from getValues(start,end) to getData(start,count). It's much less error-prone to pass in frame counts instead of start/end locations. Should have done this ages ago. This closes #1794563. * Add option to apply a transform to only the selection region, instead of the whole audio. * (to make the above work properly) Add start frame offset to wave models
author Chris Cannam
date Mon, 01 Oct 2007 13:48:38 +0000
parents 98ba77e0d897
children f3191ab6d564
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp	Sat Sep 29 10:58:31 2007 +0000
+++ b/audioio/AudioGenerator.cpp	Mon Oct 01 13:48:38 2007 +0000
@@ -358,8 +358,6 @@
 {
     QMutexLocker locker(&m_mutex);
 
-    std::cerr << "setting solo set" << std::endl;
-
     m_soloModelSet = s;
     m_soloing = true;
 }
@@ -467,15 +465,17 @@
 
 	if (prevChannel != sourceChannel) {
 	    if (startFrame >= fadeIn/2) {
-		got = dtvm->getValues
+		got = dtvm->getData
 		    (sourceChannel,
-		     startFrame - fadeIn/2, startFrame + frames + fadeOut/2,
+		     startFrame - fadeIn/2,
+                     frames + fadeOut/2 + fadeIn/2,
 		     channelBuffer);
 	    } else {
 		size_t missing = fadeIn/2 - startFrame;
-		got = dtvm->getValues
+		got = dtvm->getData
 		    (sourceChannel,
-		     0, startFrame + frames + fadeOut/2,
+		     startFrame,
+                     frames + fadeOut/2,
 		     channelBuffer + missing);
 	    }	    
 	}