ALSA: Fixed adding wrong status to error message (thanks, romain145!).

Fixes Bugzilla #3364.
This commit is contained in:
Philipp Wiesemann 2016-07-19 21:02:44 +02:00
parent 562926cdda
commit 427472fe2e
1 changed files with 2 additions and 1 deletions

View File

@ -607,7 +607,8 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
if ( ALSA_set_period_size(this, hwparams, 0) < 0 && if ( ALSA_set_period_size(this, hwparams, 0) < 0 &&
ALSA_set_buffer_size(this, hwparams, 0) < 0 ) { ALSA_set_buffer_size(this, hwparams, 0) < 0 ) {
/* Failed to set desired buffer size, do the best you can... */ /* 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); ALSA_CloseDevice(this);
return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status)); return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
} }