diff options
author | wm4 <wm4@mplayer2.org> | 2012-01-18 04:21:58 +0100 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-01-18 04:21:58 +0100 |
commit | 6e41497d5be1f107c18b2143fa45b3c46d6e95d3 (patch) | |
tree | ba18bcab5e209d3c48658bac046fa48a9c5f053a /command.c | |
parent | 064f8c2fb656462db9662c67bdbc6716958a4de4 (diff) | |
parent | f7c2ecebccc4b3c5d6299aee5b8f4d382fa78987 (diff) | |
download | mpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.bz2 mpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.xz |
Merge branch 'softvol' into my_master
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 23 |
1 files changed, 3 insertions, 20 deletions
@@ -719,10 +719,6 @@ static int mp_property_volume(m_option_t *prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; - mpctx->user_muted = 0; - switch (action) { case M_PROPERTY_SET: if (!arg) @@ -756,30 +752,17 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg, switch (action) { case M_PROPERTY_SET: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; if (!arg) return M_PROPERTY_ERROR; - if ((!!*(int *) arg) != mpctx->mixer.muted) - mixer_mute(&mpctx->mixer); - mpctx->user_muted = mpctx->mixer.muted; + mixer_setmuted(&mpctx->mixer, *(int *) arg); return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; mixer_mute(&mpctx->mixer); - mpctx->user_muted = mpctx->mixer.muted; return M_PROPERTY_OK; - case M_PROPERTY_PRINT: - if (!arg) - return M_PROPERTY_ERROR; - if (mpctx->edl_muted) { - *(char **) arg = talloc_strdup(NULL, mp_gtext("enabled (EDL)")); - return M_PROPERTY_OK; - } default: - return m_property_flag(prop, action, arg, &mpctx->mixer.muted); + return m_property_flag_ro(prop, action, arg, + mixer_getmuted(&mpctx->mixer)); } } |