From 6f0fd94580ea51df85a47edaf9cb0c21065a0ec0 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 14 Jun 2003 09:13:55 +0000 Subject: [PATCH] Fix the delay. 10ms instead of 10s. Fix A stupid bug where only the last sound would be played. --- stepmania/src/arch/Sound/RageSoundDriver_SDL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_SDL.cpp b/stepmania/src/arch/Sound/RageSoundDriver_SDL.cpp index 1e508809dc..7a30a4bd21 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_SDL.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_SDL.cpp @@ -73,7 +73,7 @@ void RageSound_SDL::GetData(void *userdata, Uint8 *stream, int len) { /* I don't like this but I can't think of another place to put it. */ while (!SOUNDMAN) - sleep(10); + SDL_Delay(10); for (unsigned i = 0; i < P->sounds.size(); ++i) { if (P->sounds[i]->stopping) @@ -88,6 +88,8 @@ void RageSound_SDL::GetData(void *userdata, Uint8 *stream, int len) { } } + mix.read(buf); + memcpy(stream, buf, len); P->last_cursor_pos += buffersize_frames; }