diff data/fileio/CodedAudioFileReader.cpp @ 687:06f13a3b9e9e debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents b4a8d8221eaf
children 1424aa29ae95
line wrap: on
line diff
--- a/data/fileio/CodedAudioFileReader.cpp	Thu May 12 17:31:24 2011 +0100
+++ b/data/fileio/CodedAudioFileReader.cpp	Mon May 16 17:19:09 2011 +0100
@@ -40,7 +40,7 @@
     m_resampler(0),
     m_resampleBuffer(0)
 {
-//    std::cerr << "CodedAudioFileReader::CodedAudioFileReader: rate " << targetRate << std::endl;
+//    DEBUG << "CodedAudioFileReader::CodedAudioFileReader: rate " << targetRate << endl;
 
     m_frameCount = 0;
     m_sampleRate = targetRate;
@@ -54,7 +54,7 @@
 
     if (m_cacheFileWritePtr) sf_close(m_cacheFileWritePtr);
 
-//    std::cerr << "CodedAudioFileReader::~CodedAudioFileReader: deleting cache file reader" << std::endl;
+//    DEBUG << "CodedAudioFileReader::~CodedAudioFileReader: deleting cache file reader" << endl;
 
     delete m_cacheFileReader;
     delete[] m_cacheWriteBuffer;
@@ -72,7 +72,7 @@
 void
 CodedAudioFileReader::startSerialised(QString id)
 {
-//    std::cerr << "CodedAudioFileReader::startSerialised(" << id << ")" << std::endl;
+//    DEBUG << "CodedAudioFileReader::startSerialised(" << id << ")" << endl;
 
     delete m_serialiser;
     m_serialiser = new Serialiser(id);
@@ -92,15 +92,15 @@
 {
     QMutexLocker locker(&m_cacheMutex);
 
-//    std::cerr << "CodedAudioFileReader::initialiseDecodeCache: file rate = " << m_fileRate << std::endl;
+//    DEBUG << "CodedAudioFileReader::initialiseDecodeCache: file rate = " << m_fileRate << endl;
 
     if (m_fileRate == 0) {
-        std::cerr << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << std::endl;
+        DEBUG << "CodedAudioFileReader::initialiseDecodeCache: ERROR: File sample rate unknown (bug in subclass implementation?)" << endl;
         m_fileRate = 48000; // got to have something
     }
     if (m_sampleRate == 0) {
         m_sampleRate = m_fileRate;
-        std::cerr << "CodedAudioFileReader::initialiseDecodeCache: rate (from file) = " << m_fileRate << std::endl;
+        DEBUG << "CodedAudioFileReader::initialiseDecodeCache: rate (from file) = " << m_fileRate << endl;
     }
     if (m_fileRate != m_sampleRate) {
         std::cerr << "CodedAudioFileReader: resampling " << m_fileRate << " -> " <<  m_sampleRate << std::endl;
@@ -354,7 +354,7 @@
     // locking)
 
     if (!m_initialised) {
-        std::cerr << "CodedAudioFileReader::getInterleavedFrames: not initialised" << std::endl;
+        DEBUG << "CodedAudioFileReader::getInterleavedFrames: not initialised" << endl;
         return;
     }