comparison data/fileio/AudioFileReaderFactory.cpp @ 667:1c8898816fd0

* More useful error message
author Chris Cannam
date Thu, 03 Feb 2011 13:15:07 +0000
parents 5746c559af15
children b4a8d8221eaf
comparison
equal deleted inserted replaced
664:c3dee40e77d2 667:1c8898816fd0
73 { 73 {
74 QString err; 74 QString err;
75 75
76 // std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\"): Requested rate: " << targetRate << std::endl; 76 // std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\"): Requested rate: " << targetRate << std::endl;
77 77
78 if (!source.isOK() || !source.isAvailable()) { 78 if (!source.isOK()) {
79 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Source unavailable" << std::endl; 79 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString().toStdString() << std::endl;
80 return 0;
81 }
82
83 if (!source.isAvailable()) {
84 std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Source not found" << std::endl;
80 return 0; 85 return 0;
81 } 86 }
82 87
83 AudioFileReader *reader = 0; 88 AudioFileReader *reader = 0;
84 89