Mercurial > hg > svcore
diff data/model/WaveFileModel.cpp @ 742:c10cb8782576 coreaudio_tests
Merge from branch "default"
author | Chris Cannam |
---|---|
date | Sun, 01 Jul 2012 11:53:00 +0100 |
parents | 1424aa29ae95 |
children | c9fc7728ab0d |
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp Mon Nov 29 12:45:39 2010 +0000 +++ b/data/model/WaveFileModel.cpp Sun Jul 01 11:53:00 2012 +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; + SVDEBUG << "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; + SVDEBUG << "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; +// SVDEBUG << "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; + SVDEBUG << "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; + SVDEBUG << "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; + SVDEBUG << "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; + SVDEBUG << "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; + SVDEBUG << "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; +// SVDEBUG << "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; +// SVDEBUG << "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; +// SVDEBUG << "WaveFileModel::fill inner loop: frame = " << frame << ", count = " << m_frameCount << ", blocksize " << readBlockSize << endl; if (updating && (frame + readBlockSize > m_frameCount)) break;