ALSA: Fixed adding wrong status to error message (thanks, romain145!).
authorPhilipp Wiesemann
Tue, 19 Jul 2016 21:02:44 +0200
changeset 1020630ca8e64db6a
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
     1.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Tue Jul 19 21:02:09 2016 +0200
     1.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Tue Jul 19 21:02:44 2016 +0200
     1.3 @@ -607,7 +607,8 @@
     1.4      if ( ALSA_set_period_size(this, hwparams, 0) < 0 &&
     1.5           ALSA_set_buffer_size(this, hwparams, 0) < 0 ) {
     1.6          /* Failed to set desired buffer size, do the best you can... */
     1.7 -        if ( ALSA_set_period_size(this, hwparams, 1) < 0 ) {
     1.8 +        status = ALSA_set_period_size(this, hwparams, 1);
     1.9 +        if (status < 0) {
    1.10              ALSA_CloseDevice(this);
    1.11              return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
    1.12          }