changeset 309:bbf87199e6e1

* double -> float -- at least until I'm reminded of why it was double before
author Chris Cannam
date Wed, 10 Oct 2007 15:30:00 +0000
parents 14e0f60435b8
children 246dbda60798
files data/fileio/QuickTimeFileReader.cpp
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/QuickTimeFileReader.cpp	Wed Oct 10 15:18:02 2007 +0000
+++ b/data/fileio/QuickTimeFileReader.cpp	Wed Oct 10 15:30:00 2007 +0000
@@ -40,7 +40,7 @@
 
     MovieAudioExtractionRef      extractionSessionRef;
     AudioBufferList              buffer;
-    double                      *data;
+    float                       *data;
     OSErr                        err; 
     AudioStreamBasicDescription  asbd;
     Movie                        movie;
@@ -189,8 +189,8 @@
         kAudioFormatFlagIsFloat |
         kAudioFormatFlagIsPacked |
         kAudioFormatFlagsNativeEndian;
-    m_d->asbd.mBitsPerChannel = sizeof(double) * 8;
-    m_d->asbd.mBytesPerFrame = sizeof(double) * m_d->asbd.mChannelsPerFrame;
+    m_d->asbd.mBitsPerChannel = sizeof(float) * 8;
+    m_d->asbd.mBytesPerFrame = sizeof(float) * m_d->asbd.mChannelsPerFrame;
     m_d->asbd.mBytesPerPacket = m_d->asbd.mBytesPerFrame;
 	
     m_d->err = MovieAudioExtractionSetProperty
@@ -204,12 +204,11 @@
         m_error = QString("Error in QuickTime decoder property set: code %1").arg(m_d->err);
         return;
     }
-
     m_d->buffer.mNumberBuffers = 1;
     m_d->buffer.mBuffers[0].mNumberChannels = m_channelCount;
     m_d->buffer.mBuffers[0].mDataByteSize =
-        sizeof(double) * m_channelCount * m_d->blockSize;
-    m_d->data = new double[m_channelCount * m_d->blockSize];
+        sizeof(float) * m_channelCount * m_d->blockSize;
+    m_d->data = new float[m_channelCount * m_d->blockSize];
     m_d->buffer.mBuffers[0].mData = m_d->data;
 
     initialiseDecodeCache();