comparison data/fileio/CodedAudioFileReader.cpp @ 754:26636c46bcdf

If a reader doesn't provide a file sample rate, blow up -- don't just assume
author Chris Cannam
date Thu, 07 Mar 2013 17:17:58 +0000
parents c10cb8782576
children 02390a4c2abe
comparison
equal deleted inserted replaced
753:fb6313da1df6 754:26636c46bcdf
94 QMutexLocker locker(&m_cacheMutex); 94 QMutexLocker locker(&m_cacheMutex);
95 95
96 SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: file rate = " << m_fileRate << endl; 96 SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: file rate = " << m_fileRate << endl;
97 97
98 if (m_fileRate == 0) { 98 if (m_fileRate == 0) {
99 SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << endl; 99 std::cerr << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << std::endl;
100 m_fileRate = 48000; // got to have something 100 throw FileOperationFailed("(coded file)", "File sample rate unknown (bug in subclass implementation?)");
101 } 101 }
102 if (m_sampleRate == 0) { 102 if (m_sampleRate == 0) {
103 m_sampleRate = m_fileRate; 103 m_sampleRate = m_fileRate;
104 SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: rate (from file) = " << m_fileRate << endl; 104 SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: rate (from file) = " << m_fileRate << endl;
105 } 105 }