comparison data/fileio/BQAFileReader.cpp @ 1595:c9c8c49b22d6 bqaudiostream

Some logging
author Chris Cannam
date Tue, 22 Jan 2019 20:07:19 +0000
parents b67f5b6a7978
children 8aa1447fe27e
comparison
equal deleted inserted replaced
1594:afa75922fe0f 1595:c9c8c49b22d6
52 try { 52 try {
53 m_stream = breakfastquay::AudioReadStreamFactory::createReadStream 53 m_stream = breakfastquay::AudioReadStreamFactory::createReadStream
54 (m_path.toUtf8().data()); 54 (m_path.toUtf8().data());
55 } catch (const std::exception &e) { 55 } catch (const std::exception &e) {
56 m_error = e.what(); 56 m_error = e.what();
57 SVDEBUG << "BQAFileReader: createReadStream failed: " << m_error << endl;
57 m_stream = 0; 58 m_stream = 0;
58 return; 59 return;
59 } 60 }
60 61
61 m_channelCount = int(m_stream->getChannelCount()); 62 m_channelCount = int(m_stream->getChannelCount());
86 if (retrieved < blockSize) { 87 if (retrieved < blockSize) {
87 break; 88 break;
88 } 89 }
89 } catch (const breakfastquay::InvalidFileFormat &f) { 90 } catch (const breakfastquay::InvalidFileFormat &f) {
90 m_error = f.what(); 91 m_error = f.what();
92 SVDEBUG << "BQAFileReader: init failed: " << m_error << endl;
91 break; 93 break;
92 } 94 }
93 95
94 if (m_cancelled) break; 96 if (m_cancelled) break;
95 } 97 }
149 if (retrieved < blockSize) { 151 if (retrieved < blockSize) {
150 break; 152 break;
151 } 153 }
152 } catch (const breakfastquay::InvalidFileFormat &f) { 154 } catch (const breakfastquay::InvalidFileFormat &f) {
153 m_reader->m_error = f.what(); 155 m_reader->m_error = f.what();
156 SVDEBUG << "BQAFileReader: decode failed: " << m_reader->m_error << endl;
154 break; 157 break;
155 } 158 }
156 159
157 if (m_reader->m_cancelled) break; 160 if (m_reader->m_cancelled) break;
158 } 161 }