Mercurial > hg > svcore
comparison data/fileio/AudioFileReaderFactory.cpp @ 1698:dbd13eb7dad1
Add tests for audio file readers presented with empty or nonsense input
author | Chris Cannam |
---|---|
date | Fri, 03 May 2019 13:33:53 +0100 |
parents | ce185d4dd408 |
children |
comparison
equal
deleted
inserted
replaced
1690:ea1aa24ebf89 | 1698:dbd13eb7dad1 |
---|---|
76 | 76 |
77 SVDEBUG << "AudioFileReaderFactory: url \"" << source.getLocation() << "\": requested rate: " << params.targetRate << (params.targetRate == 0 ? " (use source rate)" : "") << endl; | 77 SVDEBUG << "AudioFileReaderFactory: url \"" << source.getLocation() << "\": requested rate: " << params.targetRate << (params.targetRate == 0 ? " (use source rate)" : "") << endl; |
78 SVDEBUG << "AudioFileReaderFactory: local filename \"" << source.getLocalFilename() << "\", content type \"" << source.getContentType() << "\"" << endl; | 78 SVDEBUG << "AudioFileReaderFactory: local filename \"" << source.getLocalFilename() << "\", content type \"" << source.getContentType() << "\"" << endl; |
79 | 79 |
80 if (!source.isOK()) { | 80 if (!source.isOK()) { |
81 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << endl; | 81 SVDEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << endl; |
82 return nullptr; | 82 return nullptr; |
83 } | 83 } |
84 | 84 |
85 if (!source.isAvailable()) { | 85 if (!source.isAvailable()) { |
86 SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl; | 86 SVDEBUG << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl; |
87 return nullptr; | 87 return nullptr; |
88 } | 88 } |
89 | 89 |
90 AudioFileReader *reader = nullptr; | 90 AudioFileReader *reader = nullptr; |
91 | 91 |
211 delete reader; | 211 delete reader; |
212 } | 212 } |
213 } | 213 } |
214 } | 214 } |
215 | 215 |
216 SVCERR << "AudioFileReaderFactory::Failed to create a reader for " | 216 SVDEBUG << "AudioFileReaderFactory::Failed to create a reader for " |
217 << "url \"" << source.getLocation() | 217 << "url \"" << source.getLocation() |
218 << "\" (local filename \"" << source.getLocalFilename() | 218 << "\" (local filename \"" << source.getLocalFilename() |
219 << "\", content type \"" | 219 << "\", content type \"" |
220 << source.getContentType() << "\")" << endl; | 220 << source.getContentType() << "\")" << endl; |
221 return nullptr; | 221 return nullptr; |
222 } | 222 } |
223 | 223 |