ALSA: Fixed adding wrong status to error message (thanks, romain145!).
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 19 Jul 2016 21:02:44 +0200
changeset 10206 30ca8e64db6a
parent 10205 baabe483bb99
child 10207 e66f6ab2b059
ALSA: Fixed adding wrong status to error message (thanks, romain145!). Fixes Bugzilla #3364.
src/audio/alsa/SDL_alsa_audio.c
--- a/src/audio/alsa/SDL_alsa_audio.c	Tue Jul 19 21:02:09 2016 +0200
+++ b/src/audio/alsa/SDL_alsa_audio.c	Tue Jul 19 21:02:44 2016 +0200
@@ -607,7 +607,8 @@
     if ( ALSA_set_period_size(this, hwparams, 0) < 0 &&
          ALSA_set_buffer_size(this, hwparams, 0) < 0 ) {
         /* Failed to set desired buffer size, do the best you can... */
-        if ( ALSA_set_period_size(this, hwparams, 1) < 0 ) {
+        status = ALSA_set_period_size(this, hwparams, 1);
+        if (status < 0) {
             ALSA_CloseDevice(this);
             return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
         }