diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 66205bc53d..b1ce0c0a52 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -978,12 +978,21 @@ bool audio_driver_start(bool is_shutdown) settings_t *settings = config_get_ptr(); if (!current_audio || !current_audio->start || !audio_driver_context_audio_data) - return false; + goto error; if (audio_driver_alive()) - return false; + goto error; if (!settings || settings->audio.mute_enable) - return false; - return current_audio->start(audio_driver_context_audio_data, is_shutdown); + goto error; + if (!current_audio->start(audio_driver_context_audio_data, is_shutdown)) + goto error; + + return true; + +error: + RARCH_ERR("%s\n", + msg_hash_to_str(MSG_FAILED_TO_START_AUDIO_DRIVER)); + audio_driver_unset_active(); + return false; } bool audio_driver_alive(void) diff --git a/command.c b/command.c index 3d99290183..020e7236e7 100644 --- a/command.c +++ b/command.c @@ -2080,12 +2080,7 @@ bool command_event(enum event_command cmd, void *data) return false; break; case CMD_EVENT_AUDIO_START: - if (!audio_driver_start(runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL))) - { - RARCH_ERR("%s\n", - msg_hash_to_str(MSG_FAILED_TO_START_AUDIO_DRIVER)); - audio_driver_unset_active(); - } + audio_driver_start(runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)); break; case CMD_EVENT_AUDIO_MUTE_TOGGLE: {