Mercurial > hg > svcore
comparison data/fileio/CoreAudioFileReader.cpp @ 759:a43acbe3988f
More refinement in audiofile read tests and implementation
author | Chris Cannam |
---|---|
date | Fri, 08 Mar 2013 21:35:46 +0000 |
parents | dc6c0e50724c |
children | b6bb0ecb7958 |
comparison
equal
deleted
inserted
replaced
758:babed5be1ae7 | 759:a43acbe3988f |
---|---|
72 m_channelCount = 0; | 72 m_channelCount = 0; |
73 m_fileRate = 0; | 73 m_fileRate = 0; |
74 | 74 |
75 Profiler profiler("CoreAudioFileReader::CoreAudioFileReader", true); | 75 Profiler profiler("CoreAudioFileReader::CoreAudioFileReader", true); |
76 | 76 |
77 std::cerr << "CoreAudioFileReader: path is \"" << m_path.toStdString() << "\"" << std::endl; | 77 SVDEBUG << "CoreAudioFileReader: path is \"" << m_path.toStdString() << "\"" << endl; |
78 | 78 |
79 QByteArray ba = m_path.toLocal8Bit(); | 79 QByteArray ba = m_path.toLocal8Bit(); |
80 | 80 |
81 CFURLRef url = CFURLCreateFromFileSystemRepresentation | 81 CFURLRef url = CFURLCreateFromFileSystemRepresentation |
82 (kCFAllocatorDefault, | 82 (kCFAllocatorDefault, |
118 } | 118 } |
119 | 119 |
120 m_channelCount = m_d->asbd.mChannelsPerFrame; | 120 m_channelCount = m_d->asbd.mChannelsPerFrame; |
121 m_fileRate = m_d->asbd.mSampleRate; | 121 m_fileRate = m_d->asbd.mSampleRate; |
122 | 122 |
123 std::cerr << "CoreAudioReadStream: " << m_channelCount << " channels, " << m_sampleRate << " Hz" << std::endl; | 123 std::cerr << "CoreAudioReadStream: " << m_channelCount << " channels, " << m_fileRate << " Hz" << std::endl; |
124 | |
125 m_d->asbd.mSampleRate = getSampleRate(); | |
126 | 124 |
127 m_d->asbd.mFormatID = kAudioFormatLinearPCM; | 125 m_d->asbd.mFormatID = kAudioFormatLinearPCM; |
128 m_d->asbd.mFormatFlags = | 126 m_d->asbd.mFormatFlags = |
129 kAudioFormatFlagIsFloat | | 127 kAudioFormatFlagIsFloat | |
130 kAudioFormatFlagIsPacked | | 128 kAudioFormatFlagIsPacked | |