Don't stop/start the audio driver when muting/unmuting

This commit is contained in:
twinaphex 2017-04-20 10:02:54 +02:00
parent 637b26772c
commit 154b98394b

View File

@ -456,13 +456,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n");
}
/* If we start muted, stop the audio driver,
* so subsequent unmute works. */
if ( !audio_cb_inited
&& audio_driver_active
&& settings->audio.mute_enable)
audio_driver_stop();
command_event(CMD_EVENT_DSP_FILTER_INIT, NULL);
audio_driver_free_samples_count = 0;
@ -470,7 +463,6 @@ static bool audio_driver_init_internal(bool audio_cb_inited)
/* Threaded driver is initially stopped. */
if (
audio_driver_active
&& !settings->audio.mute_enable
&& audio_cb_inited
)
audio_driver_start(false);
@ -985,12 +977,9 @@ static bool audio_driver_alive(void)
bool audio_driver_start(bool is_shutdown)
{
settings_t *settings = config_get_ptr();
if (!current_audio || !current_audio->start
|| !audio_driver_context_audio_data)
goto error;
if (!settings || settings->audio.mute_enable)
goto error;
if (!current_audio->start(audio_driver_context_audio_data, is_shutdown))
goto error;