summaryrefslogtreecommitdiffstats
path: root/mixer.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-04-09 22:11:49 +0300
committerUoti Urpala <uau@mplayer2.org>2012-04-11 03:52:34 +0300
commit9624f10aa85039c73d4bdb70e8062daeabaa90c6 (patch)
tree7303f5d0011c5f7a320f0e24d74c42d8e5e2eb3f /mixer.h
parente29cb8f323031b32369bc2104ea1fd4422dd2945 (diff)
downloadmpv-9624f10aa85039c73d4bdb70e8062daeabaa90c6.tar.bz2
mpv-9624f10aa85039c73d4bdb70e8062daeabaa90c6.tar.xz
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.
Diffstat (limited to 'mixer.h')
-rw-r--r--mixer.h1
1 files changed, 1 insertions, 0 deletions
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);