Fix the delay. 10ms instead of 10s. Fix A stupid bug where only the last sound would be played.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user