Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp Tue Dec 11 13:07:40 2012 +0000 +++ b/data/fileio/CodedAudioFileReader.cpp Thu Mar 07 17:17:58 2013 +0000 @@ -96,8 +96,8 @@ SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: file rate = " << m_fileRate << endl; if (m_fileRate == 0) { - SVDEBUG << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << endl; - m_fileRate = 48000; // got to have something + std::cerr << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << std::endl; + throw FileOperationFailed("(coded file)", "File sample rate unknown (bug in subclass implementation?)"); } if (m_sampleRate == 0) { m_sampleRate = m_fileRate;