Mercurial > hg > svcore
comparison data/fileio/AudioFileReaderFactory.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 |
comparison
equal
deleted
inserted
replaced
686:b4a8d8221eaf | 687:06f13a3b9e9e |
---|---|
71 AudioFileReaderFactory::create(FileSource source, size_t targetRate, bool threading, | 71 AudioFileReaderFactory::create(FileSource source, size_t targetRate, bool threading, |
72 ProgressReporter *reporter) | 72 ProgressReporter *reporter) |
73 { | 73 { |
74 QString err; | 74 QString err; |
75 | 75 |
76 // std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << std::endl; | 76 // DEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << endl; |
77 | 77 |
78 if (!source.isOK()) { | 78 if (!source.isOK()) { |
79 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << std::endl; | 79 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << std::endl; |
80 return 0; | 80 return 0; |
81 } | 81 } |
82 | 82 |
83 if (!source.isAvailable()) { | 83 if (!source.isAvailable()) { |
84 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << std::endl; | 84 DEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl; |
85 return 0; | 85 return 0; |
86 } | 86 } |
87 | 87 |
88 AudioFileReader *reader = 0; | 88 AudioFileReader *reader = 0; |
89 | 89 |
96 | 96 |
97 if (targetRate != 0 && | 97 if (targetRate != 0 && |
98 reader->isOK() && | 98 reader->isOK() && |
99 reader->getSampleRate() != targetRate) { | 99 reader->getSampleRate() != targetRate) { |
100 | 100 |
101 std::cerr << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << std::endl; | 101 DEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << endl; |
102 | 102 |
103 delete reader; | 103 delete reader; |
104 reader = new ResamplingWavFileReader | 104 reader = new ResamplingWavFileReader |
105 (source, | 105 (source, |
106 threading ? | 106 threading ? |
187 | 187 |
188 if (targetRate != 0 && | 188 if (targetRate != 0 && |
189 reader->isOK() && | 189 reader->isOK() && |
190 reader->getSampleRate() != targetRate) { | 190 reader->getSampleRate() != targetRate) { |
191 | 191 |
192 std::cerr << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << std::endl; | 192 DEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << endl; |
193 | 193 |
194 delete reader; | 194 delete reader; |
195 reader = new ResamplingWavFileReader | 195 reader = new ResamplingWavFileReader |
196 (source, | 196 (source, |
197 threading ? | 197 threading ? |