comparison src/cdrom/macosx/AudioFilePlayer.cpp @ 772:5c5656163ebd

Fix buffer underrun problems on slow iBooks
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Jan 2004 21:32:47 +0000
parents de1b2c3063b9
children da0a2ad35bf4
comparison
equal deleted inserted replaced
771:336603031bab 772:5c5656163ebd
108 { 108 {
109 SInt64 fileDataSize = 0; 109 SInt64 fileDataSize = 0;
110 110
111 OpenFile (inFileRef, fileDataSize); 111 OpenFile (inFileRef, fileDataSize);
112 112
113 // we want about a seconds worth of data for the buffer 113 // we want about 4 seconds worth of data for the buffer
114 int bytesPerSecond = UInt32 (mFileDescription.mSampleRate * mFileDescription.mBytesPerFrame); 114 int bytesPerSecond = UInt32 (4 * mFileDescription.mSampleRate * mFileDescription.mBytesPerFrame);
115 115
116 #if DEBUG 116 #if DEBUG
117 printf("File format:\n"); 117 printf("File format:\n");
118 PrintStreamDesc (&mFileDescription); 118 PrintStreamDesc (&mFileDescription);
119 #endif 119 #endif