Fix buffer underrun problems on slow iBooks
authorSam Lantinga <slouken@libsdl.org>
Sun, 04 Jan 2004 21:32:47 +0000
changeset 772 5c5656163ebd
parent 771 336603031bab
child 773 da0a2ad35bf4
Fix buffer underrun problems on slow iBooks
src/cdrom/macosx/AudioFilePlayer.cpp
--- a/src/cdrom/macosx/AudioFilePlayer.cpp	Sun Jan 04 18:50:26 2004 +0000
+++ b/src/cdrom/macosx/AudioFilePlayer.cpp	Sun Jan 04 21:32:47 2004 +0000
@@ -110,8 +110,8 @@
 
     OpenFile (inFileRef, fileDataSize);
         
-    // we want about a seconds worth of data for the buffer
-    int bytesPerSecond = UInt32 (mFileDescription.mSampleRate * mFileDescription.mBytesPerFrame);
+    // we want about 4 seconds worth of data for the buffer
+    int bytesPerSecond = UInt32 (4 * mFileDescription.mSampleRate * mFileDescription.mBytesPerFrame);
     
 #if DEBUG
     printf("File format:\n");