Mercurial > hg > svcore
comparison data/fileio/CodedAudioFileReader.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 | 939ffbc32d50 |
children | 06f13a3b9e9e |
comparison
equal
deleted
inserted
replaced
685:99222d4bfc78 | 686:b4a8d8221eaf |
---|---|
59 delete m_cacheFileReader; | 59 delete m_cacheFileReader; |
60 delete[] m_cacheWriteBuffer; | 60 delete[] m_cacheWriteBuffer; |
61 | 61 |
62 if (m_cacheFileName != "") { | 62 if (m_cacheFileName != "") { |
63 if (!QFile(m_cacheFileName).remove()) { | 63 if (!QFile(m_cacheFileName).remove()) { |
64 std::cerr << "WARNING: CodedAudioFileReader::~CodedAudioFileReader: Failed to delete cache file \"" << m_cacheFileName.toStdString() << "\"" << std::endl; | 64 std::cerr << "WARNING: CodedAudioFileReader::~CodedAudioFileReader: Failed to delete cache file \"" << m_cacheFileName << "\"" << std::endl; |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
68 delete m_resampler; | 68 delete m_resampler; |
69 delete[] m_resampleBuffer; | 69 delete[] m_resampleBuffer; |
70 } | 70 } |
71 | 71 |
72 void | 72 void |
73 CodedAudioFileReader::startSerialised(QString id) | 73 CodedAudioFileReader::startSerialised(QString id) |
74 { | 74 { |
75 // std::cerr << "CodedAudioFileReader::startSerialised(" << id.toStdString() << ")" << std::endl; | 75 // std::cerr << "CodedAudioFileReader::startSerialised(" << id << ")" << std::endl; |
76 | 76 |
77 delete m_serialiser; | 77 delete m_serialiser; |
78 m_serialiser = new Serialiser(id); | 78 m_serialiser = new Serialiser(id); |
79 } | 79 } |
80 | 80 |
142 // information here | 142 // information here |
143 | 143 |
144 m_cacheFileReader = new WavFileReader(m_cacheFileName); | 144 m_cacheFileReader = new WavFileReader(m_cacheFileName); |
145 | 145 |
146 if (!m_cacheFileReader->isOK()) { | 146 if (!m_cacheFileReader->isOK()) { |
147 std::cerr << "ERROR: CodedAudioFileReader::initialiseDecodeCache: Failed to construct WAV file reader for temporary file: " << m_cacheFileReader->getError().toStdString() << std::endl; | 147 std::cerr << "ERROR: CodedAudioFileReader::initialiseDecodeCache: Failed to construct WAV file reader for temporary file: " << m_cacheFileReader->getError() << std::endl; |
148 delete m_cacheFileReader; | 148 delete m_cacheFileReader; |
149 m_cacheFileReader = 0; | 149 m_cacheFileReader = 0; |
150 m_cacheMode = CacheInMemory; | 150 m_cacheMode = CacheInMemory; |
151 sf_close(m_cacheFileWritePtr); | 151 sf_close(m_cacheFileWritePtr); |
152 } | 152 } |
153 | 153 |
154 } else { | 154 } else { |
155 std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to open cache file \"" << m_cacheFileName.toStdString() << "\" (" << m_channelCount << " channels, sample rate " << m_sampleRate << " for writing, falling back to in-memory cache" << std::endl; | 155 std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to open cache file \"" << m_cacheFileName << "\" (" << m_channelCount << " channels, sample rate " << m_sampleRate << " for writing, falling back to in-memory cache" << std::endl; |
156 m_cacheMode = CacheInMemory; | 156 m_cacheMode = CacheInMemory; |
157 } | 157 } |
158 | 158 |
159 } catch (DirectoryCreationFailed f) { | 159 } catch (DirectoryCreationFailed f) { |
160 std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to create temporary directory! Falling back to in-memory cache" << std::endl; | 160 std::cerr << "CodedAudioFileReader::initialiseDecodeCache: failed to create temporary directory! Falling back to in-memory cache" << std::endl; |