Fix the delay. 10ms instead of 10s. Fix A stupid bug where only the last sound would be played.

This commit is contained in:
Steve Checkoway
2003-06-14 09:13:55 +00:00
parent 6abd605ce8
commit 6f0fd94580
@@ -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;
}