Mercurial > hg > svcore
comparison data/fileio/MP3FileReader.cpp @ 386:e6d11871e4c9
* Fix bug that was causing decoded audio files (mp3s, oggs) to come up some of
the time with zero sample rate
author | Chris Cannam |
---|---|
date | Sat, 01 Mar 2008 16:17:44 +0000 |
parents | f1ff248a793e |
children | 183ee2a55fc7 |
comparison
equal
deleted
inserted
replaced
385:9b35a1731c3d | 386:e6d11871e4c9 |
---|---|
133 } else { | 133 } else { |
134 | 134 |
135 m_decodeThread = new DecodeThread(this); | 135 m_decodeThread = new DecodeThread(this); |
136 m_decodeThread->start(); | 136 m_decodeThread->start(); |
137 | 137 |
138 while ((m_channelCount == 0 || m_fileRate == 0) && !m_done) { | 138 while ((m_channelCount == 0 || m_fileRate == 0 || m_sampleRate == 0) |
139 && !m_done) { | |
139 usleep(10); | 140 usleep(10); |
140 } | 141 } |
142 | |
143 std::cerr << "MP3FileReader ctor: exiting with file rate = " << m_fileRate << std::endl; | |
141 } | 144 } |
142 } | 145 } |
143 | 146 |
144 MP3FileReader::~MP3FileReader() | 147 MP3FileReader::~MP3FileReader() |
145 { | 148 { |