diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-04-09 22:11:49 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-04-11 03:52:34 +0300 |
commit | 9624f10aa85039c73d4bdb70e8062daeabaa90c6 (patch) | |
tree | 7303f5d0011c5f7a320f0e24d74c42d8e5e2eb3f /command.c | |
parent | e29cb8f323031b32369bc2104ea1fd4422dd2945 (diff) | |
download | mpv-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 'command.c')
-rw-r--r-- | command.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -719,8 +719,6 @@ static int mp_property_volume(m_option_t *prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } - mpctx->user_muted = 0; - switch (action) { case M_PROPERTY_SET: if (!arg) @@ -757,12 +755,10 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg, if (!arg) return M_PROPERTY_ERROR; mixer_setmute(&mpctx->mixer, *(int *) arg); - mpctx->user_muted = mpctx->mixer.muted; return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: mixer_setmute(&mpctx->mixer, !mixer_getmute(&mpctx->mixer)); - mpctx->user_muted = mpctx->mixer.muted; return M_PROPERTY_OK; default: return m_property_flag_ro(prop, action, arg, |