From 9624f10aa85039c73d4bdb70e8062daeabaa90c6 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 9 Apr 2012 22:11:49 +0300 Subject: audio: fix unmute-at-end logic The player tried to disable mute before exiting, so that if mute is emulated by setting volume to 0 and the volume setting is a system-global one, we don't leave it at 0. However, the logic doing this at process exit was flawed, as volume settings are handled by audio output instances and the audio output that set the mute state may have been closed earlier. Trying to write reliably working logic that restores volume at exit only would be tricky, so change the code to always unmute an audio driver before closing it and restore mute status if one is opened again later. --- mixer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mixer.h') diff --git a/mixer.h b/mixer.h index e626237539..c1903750f1 100644 --- a/mixer.h +++ b/mixer.h @@ -39,6 +39,7 @@ typedef struct mixer { } mixer_t; void mixer_reinit(struct mixer *mixer, struct ao *ao); +void mixer_uninit(struct mixer *mixer); void mixer_getvolume(mixer_t *mixer, float *l, float *r); void mixer_setvolume(mixer_t *mixer, float l, float r); void mixer_incvolume(mixer_t *mixer); -- cgit v1.2.3