Mercurial > hg > svapp
comparison 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 |
comparison
equal
deleted
inserted
replaced
61:215b8b1b0308 | 62:ae2627ac7db2 |
---|---|
30 #include <samplerate.h> | 30 #include <samplerate.h> |
31 | 31 |
32 #include <set> | 32 #include <set> |
33 #include <map> | 33 #include <map> |
34 | 34 |
35 #ifdef HAVE_RUBBERBAND | |
36 #include <rubberband/RubberBandStretcher.h> | |
37 #else | |
38 class PhaseVocoderTimeStretcher; | |
39 #endif | |
40 | |
35 class Model; | 41 class Model; |
36 class ViewManager; | 42 class ViewManager; |
37 class AudioGenerator; | 43 class AudioGenerator; |
38 class PlayParameters; | 44 class PlayParameters; |
39 class PhaseVocoderTimeStretcher; | |
40 class RealTimePluginInstance; | 45 class RealTimePluginInstance; |
41 | 46 |
42 /** | 47 /** |
43 * AudioCallbackPlaySource manages audio data supply to callback-based | 48 * AudioCallbackPlaySource manages audio data supply to callback-based |
44 * audio APIs such as JACK or CoreAudio. It maintains one ring buffer | 49 * audio APIs such as JACK or CoreAudio. It maintains one ring buffer |
302 } | 307 } |
303 | 308 |
304 void clearRingBuffers(bool haveLock = false, size_t count = 0); | 309 void clearRingBuffers(bool haveLock = false, size_t count = 0); |
305 void unifyRingBuffers(); | 310 void unifyRingBuffers(); |
306 | 311 |
312 #ifdef HAVE_RUBBERBAND | |
313 RubberBand::RubberBandStretcher *m_timeStretcher; | |
314 QMutex m_timeStretchRatioMutex; | |
315 #else | |
307 PhaseVocoderTimeStretcher *m_timeStretcher; | 316 PhaseVocoderTimeStretcher *m_timeStretcher; |
308 Scavenger<PhaseVocoderTimeStretcher> m_timeStretcherScavenger; | 317 Scavenger<PhaseVocoderTimeStretcher> m_timeStretcherScavenger; |
318 #endif | |
309 | 319 |
310 // Called from fill thread, m_playing true, mutex held | 320 // Called from fill thread, m_playing true, mutex held |
311 // Return true if work done | 321 // Return true if work done |
312 bool fillBuffers(); | 322 bool fillBuffers(); |
313 | 323 |