Mercurial > hg > svcore
diff data/fileio/WavFileReader.cpp @ 843:e802e550a1f2
Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author | Chris Cannam |
---|---|
date | Tue, 26 Nov 2013 13:35:08 +0000 |
parents | f0558e69a074 |
children | 59e7fe1b1003 |
line wrap: on
line diff
--- a/data/fileio/WavFileReader.cpp Tue Nov 26 11:16:37 2013 +0000 +++ b/data/fileio/WavFileReader.cpp Tue Nov 26 13:35:08 2013 +0000 @@ -40,9 +40,9 @@ m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo); if (!m_file || (!fileUpdating && m_fileInfo.channels <= 0)) { - std::cerr << "WavFileReader::initialize: Failed to open file at \"" + cerr << "WavFileReader::initialize: Failed to open file at \"" << m_path << "\" (" - << sf_strerror(m_file) << ")" << std::endl; + << sf_strerror(m_file) << ")" << endl; if (m_file) { m_error = QString("Couldn't load audio file '%1':\n%2") @@ -67,14 +67,14 @@ // every file type of "at least" the historical period of Ogg // or FLAC as non-seekable. int type = m_fileInfo.format & SF_FORMAT_TYPEMASK; -// std::cerr << "WavFileReader: format type is " << type << " (flac, ogg are " << SF_FORMAT_FLAC << ", " << SF_FORMAT_OGG << ")" << std::endl; +// cerr << "WavFileReader: format type is " << type << " (flac, ogg are " << SF_FORMAT_FLAC << ", " << SF_FORMAT_OGG << ")" << endl; if (type >= SF_FORMAT_FLAC || type >= SF_FORMAT_OGG) { -// std::cerr << "WavFileReader: Recording as non-seekable" << std::endl; +// cerr << "WavFileReader: Recording as non-seekable" << endl; m_seekable = false; } } -// std::cerr << "WavFileReader: Frame count " << m_frameCount << ", channel count " << m_channelCount << ", sample rate " << m_sampleRate << ", seekable " << m_seekable << std::endl; +// cerr << "WavFileReader: Frame count " << m_frameCount << ", channel count " << m_channelCount << ", sample rate " << m_sampleRate << ", seekable " << m_seekable << endl; } @@ -95,8 +95,8 @@ sf_close(m_file); m_file = sf_open(m_path.toLocal8Bit(), SFM_READ, &m_fileInfo); if (!m_file || m_fileInfo.channels <= 0) { - std::cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path << "\" (" - << sf_strerror(m_file) << ")" << std::endl; + cerr << "WavFileReader::updateFrameCount: Failed to open file at \"" << m_path << "\" (" + << sf_strerror(m_file) << ")" << endl; } } @@ -110,7 +110,7 @@ } if (m_frameCount != prevCount) { -// std::cerr << "frameCountChanged" << std::endl; +// cerr << "frameCountChanged" << endl; emit frameCountChanged(); } } @@ -151,21 +151,21 @@ if (start != m_lastStart || count != m_lastCount) { if (sf_seek(m_file, start, SEEK_SET) < 0) { -// std::cerr << "sf_seek failed" << std::endl; +// cerr << "sf_seek failed" << endl; return; } if (count * m_fileInfo.channels > m_bufsiz) { -// std::cerr << "WavFileReader: Reallocating buffer for " << count +// cerr << "WavFileReader: Reallocating buffer for " << count // << " frames, " << m_fileInfo.channels << " channels: " -// << m_bufsiz << " floats" << std::endl; +// << m_bufsiz << " floats" << endl; m_bufsiz = count * m_fileInfo.channels; delete[] m_buffer; m_buffer = new float[m_bufsiz]; } if ((readCount = sf_readf_float(m_file, m_buffer, count)) < 0) { -// std::cerr << "sf_readf_float failed" << std::endl; +// cerr << "sf_readf_float failed" << endl; return; } @@ -175,7 +175,7 @@ for (size_t i = 0; i < count * m_fileInfo.channels; ++i) { if (i >= m_bufsiz) { - std::cerr << "INTERNAL ERROR: WavFileReader::getInterleavedFrames: " << i << " >= " << m_bufsiz << std::endl; + cerr << "INTERNAL ERROR: WavFileReader::getInterleavedFrames: " << i << " >= " << m_bufsiz << endl; } results.push_back(m_buffer[i]); }