fix prebuffering logic

This commit is contained in:
Glenn Maynard
2004-08-29 01:50:17 +00:00
parent dd9a531e66
commit 2d6e9fecd7
@@ -340,7 +340,7 @@ void RageSound_Generic_Software::StartMixing( RageSoundBase *snd )
/* Prebuffer some frames before changing the sound to PLAYING. */
bool ReachedEOF = false;
int frames_filled = 0;
while( !ReachedEOF && frames_to_buffer < min_fill_frames )
while( !ReachedEOF && frames_filled < min_fill_frames && frames_filled < BufferSize )
{
// LOG->Trace("StartMixing: (#%i) buffering %i (%i writable) (%p)", i, (int) frames_to_buffer, s.buffer.num_writable(), s.snd );
int wrote = GetDataForSound( s );