From 2d6e9fecd7ec21b0203d6b9aea8a914432341acf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 29 Aug 2004 01:50:17 +0000 Subject: [PATCH] fix prebuffering logic --- stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 757c52b62d..0b4a958e8b 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -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 );