Mercurial > hg > svcore
comparison data/fileio/MP3FileReader.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 | 1424aa29ae95 |
children | f3cda3280398 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
842:23d3a6eca5c3 | 843:e802e550a1f2 |
---|---|
93 .arg(m_path).arg(offset); | 93 .arg(m_path).arg(offset); |
94 delete[] m_filebuffer; | 94 delete[] m_filebuffer; |
95 ::close(fd); | 95 ::close(fd); |
96 return; | 96 return; |
97 } else if (sz == 0) { | 97 } else if (sz == 0) { |
98 std::cerr << QString("MP3FileReader::MP3FileReader: Warning: reached EOF after only %1 of %2 bytes") | 98 cerr << QString("MP3FileReader::MP3FileReader: Warning: reached EOF after only %1 of %2 bytes") |
99 .arg(offset).arg(m_fileSize) << std::endl; | 99 .arg(offset).arg(m_fileSize) << endl; |
100 m_fileSize = offset; | 100 m_fileSize = offset; |
101 break; | 101 break; |
102 } | 102 } |
103 offset += sz; | 103 offset += sz; |
104 } | 104 } |
135 while ((m_channelCount == 0 || m_fileRate == 0 || m_sampleRate == 0) | 135 while ((m_channelCount == 0 || m_fileRate == 0 || m_sampleRate == 0) |
136 && !m_done) { | 136 && !m_done) { |
137 usleep(10); | 137 usleep(10); |
138 } | 138 } |
139 | 139 |
140 std::cerr << "MP3FileReader ctor: exiting with file rate = " << m_fileRate << std::endl; | 140 cerr << "MP3FileReader ctor: exiting with file rate = " << m_fileRate << endl; |
141 } | 141 } |
142 | 142 |
143 if (m_error != "") { | 143 if (m_error != "") { |
144 std::cerr << "MP3FileReader::MP3FileReader(\"" << m_path << "\"): ERROR: " << m_error << std::endl; | 144 cerr << "MP3FileReader::MP3FileReader(\"" << m_path << "\"): ERROR: " << m_error << endl; |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 MP3FileReader::~MP3FileReader() | 148 MP3FileReader::~MP3FileReader() |
149 { | 149 { |
241 return ""; | 241 return ""; |
242 } | 242 } |
243 | 243 |
244 id3_utf8_t *u8str = id3_ucs4_utf8duplicate(ustr); | 244 id3_utf8_t *u8str = id3_ucs4_utf8duplicate(ustr); |
245 if (!u8str) { | 245 if (!u8str) { |
246 std::cerr << "MP3FileReader::loadTags: ERROR: Internal error: Failed to convert UCS4 to UTF8 in ID3 title" << std::endl; | 246 cerr << "MP3FileReader::loadTags: ERROR: Internal error: Failed to convert UCS4 to UTF8 in ID3 title" << endl; |
247 return ""; | 247 return ""; |
248 } | 248 } |
249 | 249 |
250 QString rv = QString::fromUtf8((const char *)u8str); | 250 QString rv = QString::fromUtf8((const char *)u8str); |
251 free(u8str); | 251 free(u8str); |
319 | 319 |
320 #ifdef HAVE_ID3TAG | 320 #ifdef HAVE_ID3TAG |
321 if (length > ID3_TAG_QUERYSIZE) { | 321 if (length > ID3_TAG_QUERYSIZE) { |
322 int taglen = id3_tag_query(start, ID3_TAG_QUERYSIZE); | 322 int taglen = id3_tag_query(start, ID3_TAG_QUERYSIZE); |
323 if (taglen > 0) { | 323 if (taglen > 0) { |
324 // std::cerr << "ID3 tag length to skip: " << taglen << std::endl; | 324 // cerr << "ID3 tag length to skip: " << taglen << endl; |
325 start += taglen; | 325 start += taglen; |
326 length -= taglen; | 326 length -= taglen; |
327 } | 327 } |
328 } | 328 } |
329 #endif | 329 #endif |