diff audioio/AudioCallbackPlaySource.cpp @ 39:4ed2448582cc

* Switch from fftw3 to fftw3f. I think the efficiency improvement is probably worth the lower precision, although I ought to do a few more tests.
author Chris Cannam
date Thu, 15 Jun 2006 12:28:47 +0000
parents 54287e5e7451
children a4a05344c7d6
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Fri May 12 14:40:43 2006 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Thu Jun 15 12:28:47 2006 +0000
@@ -602,9 +602,9 @@
 	    //what sort of quality level to use -- or at least to
 	    //allow the user to configure it
 	    (new IntegerTimeStretcher(factor, blockSize, 128),
-	     new double[blockSize * factor]);
+	     new float[blockSize * factor]);
     }
-    m_stretchInputBuffer = new double[blockSize];
+    m_stretchInputBuffer = new float[blockSize];
 }
 
 AudioCallbackPlaySource::TimeStretcherData::~TimeStretcherData()
@@ -625,13 +625,13 @@
     return m_stretcher[channel].first;
 }
 
-double *
+float *
 AudioCallbackPlaySource::TimeStretcherData::getOutputBuffer(size_t channel)
 {
     return m_stretcher[channel].second;
 }
 
-double *
+float *
 AudioCallbackPlaySource::TimeStretcherData::getInputBuffer()
 {
     return m_stretchInputBuffer;
@@ -721,7 +721,7 @@
     if (m_slowdownCounter == 0) {
 
 	size_t got = 0;
-	double *ib = timeStretcher->getInputBuffer();
+	float *ib = timeStretcher->getInputBuffer();
 
 	for (size_t ch = 0; ch < getTargetChannelCount(); ++ch) {
 
@@ -753,7 +753,7 @@
 
     for (size_t ch = 0; ch < getTargetChannelCount(); ++ch) {
 
-	double *ob = timeStretcher->getOutputBuffer(ch);
+	float *ob = timeStretcher->getOutputBuffer(ch);
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
 	std::cerr << "AudioCallbackPlaySource::getSamples: Copying from (" << (m_slowdownCounter * count) << "," << count << ") to buffer" << std::endl;