mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
sdl2: Fix broken audio in MVE playback.
This doesn't fix the audio gaps, just the static introduced in the SDL2 port. SDL2 does not initialize the audio callback's buffer, unlike SDL 1.2, under the assumption the callback is going to fully write it anyhow. But since the movie player wants to mix against the current contents of the buffer, we need to explicitly initialize it to silence first.
This commit is contained in:
parent
ff571ed7dd
commit
65b1a7dc3b
@ -775,6 +775,8 @@ static void LinuxSoundMixBuffersIntoMain(int len) {
|
||||
}
|
||||
|
||||
static void LinuxSoundThreadHandler(void *unused, Uint8 *stream, int len) {
|
||||
SDL_memset(stream, '\0', len);
|
||||
|
||||
LnxBuffers[0]->buffer = stream;
|
||||
LnxBuffers[0]->buffer_len = len;
|
||||
LnxBuffers[0]->play_cursor = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user