diff 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
line wrap: on
line diff
--- a/data/fileio/MP3FileReader.cpp	Wed Feb 27 18:04:10 2008 +0000
+++ b/data/fileio/MP3FileReader.cpp	Sat Mar 01 16:17:44 2008 +0000
@@ -135,9 +135,12 @@
         m_decodeThread = new DecodeThread(this);
         m_decodeThread->start();
 
-        while ((m_channelCount == 0 || m_fileRate == 0) && !m_done) {
+        while ((m_channelCount == 0 || m_fileRate == 0 || m_sampleRate == 0)
+               && !m_done) {
             usleep(10);
         }
+        
+        std::cerr << "MP3FileReader ctor: exiting with file rate = " << m_fileRate << std::endl;
     }
 }