Mercurial > hg > svcore
diff data/model/WaveFileModel.cpp @ 687:06f13a3b9e9e debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:09 +0100 |
parents | d7f3dfe6f9a4 |
children | 1424aa29ae95 |
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp Thu May 12 17:31:24 2011 +0100 +++ b/data/model/WaveFileModel.cpp Mon May 16 17:19:09 2011 +0100 @@ -53,8 +53,8 @@ m_reader = AudioFileReaderFactory::createThreadingReader (m_source, targetRate); if (m_reader) { - std::cerr << "WaveFileModel::WaveFileModel: reader rate: " - << m_reader->getSampleRate() << std::endl; + DEBUG << "WaveFileModel::WaveFileModel: reader rate: " + << m_reader->getSampleRate() << endl; } } if (m_reader) setObjectName(m_reader->getTitle()); @@ -115,7 +115,7 @@ prevCompletion = *completion; } #ifdef DEBUG_WAVE_FILE_MODEL - std::cerr << "WaveFileModel::isReady(): ready = " << ready << ", completion = " << (completion ? *completion : -1) << std::endl; + DEBUG << "WaveFileModel::isReady(): ready = " << ready << ", completion = " << (completion ? *completion : -1) << endl; #endif return ready; } @@ -210,8 +210,8 @@ } #ifdef DEBUG_WAVE_FILE_MODEL -// std::cerr << "WaveFileModel::getValues(" << channel << ", " -// << start << ", " << end << "): calling reader" << std::endl; +// DEBUG << "WaveFileModel::getValues(" << channel << ", " +// << start << ", " << end << "): calling reader" << endl; #endif int channels = getChannelCount(); @@ -534,7 +534,7 @@ } #ifdef DEBUG_WAVE_FILE_MODEL - cerr << "returning " << ranges.size() << " ranges" << endl; + DEBUG << "returning " << ranges.size() << " ranges" << endl; #endif return; } @@ -607,7 +607,7 @@ m_fillThread->start(); #ifdef DEBUG_WAVE_FILE_MODEL - std::cerr << "WaveFileModel::fillCache: started fill thread" << std::endl; + DEBUG << "WaveFileModel::fillCache: started fill thread" << endl; #endif } @@ -617,7 +617,7 @@ if (m_fillThread) { size_t fillExtent = m_fillThread->getFillExtent(); #ifdef DEBUG_WAVE_FILE_MODEL - cerr << "WaveFileModel::fillTimerTimedOut: extent = " << fillExtent << endl; + DEBUG << "WaveFileModel::fillTimerTimedOut: extent = " << fillExtent << endl; #endif if (fillExtent > m_lastFillExtent) { emit modelChanged(m_lastFillExtent, fillExtent); @@ -625,7 +625,7 @@ } } else { #ifdef DEBUG_WAVE_FILE_MODEL - cerr << "WaveFileModel::fillTimerTimedOut: no thread" << std::endl; + DEBUG << "WaveFileModel::fillTimerTimedOut: no thread" << endl; #endif emit modelChanged(); } @@ -646,7 +646,7 @@ emit modelChanged(); emit ready(); #ifdef DEBUG_WAVE_FILE_MODEL - cerr << "WaveFileModel::cacheFilled" << endl; + DEBUG << "WaveFileModel::cacheFilled" << endl; #endif } @@ -669,7 +669,7 @@ if (updating) { while (channels == 0 && !m_model.m_exiting) { -// std::cerr << "WaveFileModel::fill: Waiting for channels..." << std::endl; +// DEBUG << "WaveFileModel::fill: Waiting for channels..." << endl; sleep(1); channels = m_model.getChannelCount(); } @@ -690,11 +690,11 @@ updating = m_model.m_reader->isUpdating(); m_frameCount = m_model.getFrameCount(); -// std::cerr << "WaveFileModel::fill: frame = " << frame << ", count = " << m_frameCount << std::endl; +// DEBUG << "WaveFileModel::fill: frame = " << frame << ", count = " << m_frameCount << endl; while (frame < m_frameCount) { -// std::cerr << "WaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << std::endl; +// DEBUG << "WaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << endl; if (updating && (frame + readBlockSize > m_frameCount)) break;