Mercurial > hg > svcore
comparison data/fileio/CoreAudioFileReader.cpp @ 1145:9c7633904ec2
OSX build stuff
author | Chris Cannam |
---|---|
date | Wed, 04 Nov 2015 14:18:22 +0000 |
parents | a1cd5abcb38b |
children | 0a9193dc136b |
comparison
equal
deleted
inserted
replaced
1144:c8e291700c0e | 1145:9c7633904ec2 |
---|---|
55 text[4] = '\0'; | 55 text[4] = '\0'; |
56 return QString("%1 (%2)").arg(err).arg(QString::fromLocal8Bit(text)); | 56 return QString("%1 (%2)").arg(err).arg(QString::fromLocal8Bit(text)); |
57 } | 57 } |
58 | 58 |
59 CoreAudioFileReader::CoreAudioFileReader(FileSource source, | 59 CoreAudioFileReader::CoreAudioFileReader(FileSource source, |
60 DecodeMode decodeMode, | 60 DecodeMode /* decodeMode */, |
61 CacheMode mode, | 61 CacheMode mode, |
62 sv_samplerate_t targetRate, | 62 sv_samplerate_t targetRate, |
63 bool normalised, | 63 bool normalised, |
64 ProgressReporter *reporter) : | 64 ProgressReporter *reporter) : |
65 CodedAudioFileReader(mode, targetRate, normalised), | 65 CodedAudioFileReader(mode, targetRate, normalised), |
178 // cerr << "Read " << framesRead << " frames (block size " << m_d->blockSize << ")" << endl; | 178 // cerr << "Read " << framesRead << " frames (block size " << m_d->blockSize << ")" << endl; |
179 | 179 |
180 // buffers are interleaved unless specified otherwise | 180 // buffers are interleaved unless specified otherwise |
181 addSamplesToDecodeCache((float *)m_d->buffer.mBuffers[0].mData, framesRead); | 181 addSamplesToDecodeCache((float *)m_d->buffer.mBuffers[0].mData, framesRead); |
182 | 182 |
183 if (framesRead < m_d->blockSize) break; | 183 if ((int)framesRead < m_d->blockSize) break; |
184 } | 184 } |
185 | 185 |
186 finishDecodeCache(); | 186 finishDecodeCache(); |
187 endSerialised(); | 187 endSerialised(); |
188 | 188 |
194 { | 194 { |
195 cerr << "CoreAudioFileReader::~CoreAudioFileReader" << endl; | 195 cerr << "CoreAudioFileReader::~CoreAudioFileReader" << endl; |
196 | 196 |
197 if (m_d->valid) { | 197 if (m_d->valid) { |
198 ExtAudioFileDispose(m_d->file); | 198 ExtAudioFileDispose(m_d->file); |
199 delete[] m_d->buffer.mBuffers[0].mData; | 199 delete[] (float *)(m_d->buffer.mBuffers[0].mData); |
200 } | 200 } |
201 | 201 |
202 delete m_d; | 202 delete m_d; |
203 } | 203 } |
204 | 204 |