Navigation Menu

Skip to content

Commit

Permalink
ALSA: Fixed adding wrong status to error message (thanks, romain145!).
Browse files Browse the repository at this point in the history
Fixes Bugzilla #3364.
  • Loading branch information
philippwiesemann committed Jul 19, 2016
1 parent 562926c commit 427472f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/audio/alsa/SDL_alsa_audio.c
Expand Up @@ -607,7 +607,8 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
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));
}
Expand Down

0 comments on commit 427472f

Please sign in to comment.