comparison data/fileio/WavFileReader.cpp @ 686:b4a8d8221eaf debug-output

Remove most toStdString calls (no longer needed, with debug header)
author Chris Cannam
date Thu, 12 May 2011 17:31:24 +0100
parents bd527db65d20
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
685:99222d4bfc78 686:b4a8d8221eaf
38 m_fileInfo.frames = 0; 38 m_fileInfo.frames = 0;
39 m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo); 39 m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo);
40 40
41 if (!m_file || (!fileUpdating && m_fileInfo.channels <= 0)) { 41 if (!m_file || (!fileUpdating && m_fileInfo.channels <= 0)) {
42 std::cerr << "WavFileReader::initialize: Failed to open file at \"" 42 std::cerr << "WavFileReader::initialize: Failed to open file at \""
43 << m_path.toStdString() << "\" (" 43 << m_path << "\" ("
44 << sf_strerror(m_file) << ")" << std::endl; 44 << sf_strerror(m_file) << ")" << std::endl;
45 45
46 if (m_file) { 46 if (m_file) {
47 m_error = QString("Couldn't load audio file '%1':\n%2") 47 m_error = QString("Couldn't load audio file '%1':\n%2")
48 .arg(m_path).arg(sf_strerror(m_file)); 48 .arg(m_path).arg(sf_strerror(m_file));
78 78
79 if (m_file) { 79 if (m_file) {
80 sf_close(m_file); 80 sf_close(m_file);
81 m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo); 81 m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo);
82 if (!m_file || m_fileInfo.channels <= 0) { 82 if (!m_file || m_fileInfo.channels <= 0) {
83 std::cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path.toStdString() << "\" (" 83 std::cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path << "\" ("
84 << sf_strerror(m_file) << ")" << std::endl; 84 << sf_strerror(m_file) << ")" << std::endl;
85 } 85 }
86 } 86 }
87 87
88 // std::cerr << "WavFileReader::updateFrameCount: now " << m_fileInfo.frames << std::endl; 88 // std::cerr << "WavFileReader::updateFrameCount: now " << m_fileInfo.frames << std::endl;