Mercurial > hg > svcore
comparison data/fileio/AudioFileReaderFactory.cpp @ 690:1424aa29ae95
Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:26:52 +0100 |
parents | 06f13a3b9e9e |
children | c10cb8782576 |
comparison
equal
deleted
inserted
replaced
689:573d45e9487b | 690:1424aa29ae95 |
---|---|
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 // DEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\"): Requested rate: " << targetRate << endl; | 76 // SVDEBUG << "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 DEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl; | 84 SVDEBUG << "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 DEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << endl; | 101 SVDEBUG << "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 DEBUG << "AudioFileReaderFactory::createReader: WAV file rate: " << reader->getSampleRate() << ", creating resampling reader" << endl; | 192 SVDEBUG << "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 ? |