27 lines
782 B
Diff
27 lines
782 B
Diff
Merge this bug as it can affect performance :
|
|
https://github.com/OpenDingux/SDL/commit/e51100dce8da9099278dac9f5affbecf6396378b
|
|
|
|
--- a/src/audio/alsa/SDL_alsa_audio.c
|
|
+++ b/src/audio/alsa/SDL_alsa_audio.c
|
|
@@ -479,6 +479,10 @@
|
|
return(-1);
|
|
}
|
|
|
|
+ /* Switch to blocking mode for playback */
|
|
+ /* Note: this must happen before hw/sw params are set. */
|
|
+ SDL_NAME(snd_pcm_nonblock)(pcm_handle, 0);
|
|
+
|
|
/* Figure out what the hardware is capable of */
|
|
snd_pcm_hw_params_alloca(&hwparams);
|
|
status = SDL_NAME(snd_pcm_hw_params_any)(pcm_handle, hwparams);
|
|
@@ -611,9 +615,6 @@
|
|
}
|
|
SDL_memset(mixbuf, spec->silence, spec->size);
|
|
|
|
- /* Switch to blocking mode for playback */
|
|
- SDL_NAME(snd_pcm_nonblock)(pcm_handle, 0);
|
|
-
|
|
/* We're ready to rock and roll. :-) */
|
|
return(0);
|
|
}
|