diff audioio/AudioCallbackPlaySource.h @ 62:ae2627ac7db2

* Add support for Rubber Band timestretcher
author Chris Cannam
date Mon, 26 Nov 2007 13:33:44 +0000
parents eb596ef12041
children 9fc4b256c283 22bf057ea151
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.h	Fri Nov 23 16:48:23 2007 +0000
+++ b/audioio/AudioCallbackPlaySource.h	Mon Nov 26 13:33:44 2007 +0000
@@ -32,11 +32,16 @@
 #include <set>
 #include <map>
 
+#ifdef HAVE_RUBBERBAND
+#include <rubberband/RubberBandStretcher.h>
+#else
+class PhaseVocoderTimeStretcher;
+#endif
+
 class Model;
 class ViewManager;
 class AudioGenerator;
 class PlayParameters;
-class PhaseVocoderTimeStretcher;
 class RealTimePluginInstance;
 
 /**
@@ -304,8 +309,13 @@
     void clearRingBuffers(bool haveLock = false, size_t count = 0);
     void unifyRingBuffers();
 
+#ifdef HAVE_RUBBERBAND
+    RubberBand::RubberBandStretcher *m_timeStretcher;
+    QMutex m_timeStretchRatioMutex;
+#else
     PhaseVocoderTimeStretcher *m_timeStretcher;
     Scavenger<PhaseVocoderTimeStretcher> m_timeStretcherScavenger;
+#endif
 
     // Called from fill thread, m_playing true, mutex held
     // Return true if work done