summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-01-18 04:21:58 +0100
committerwm4 <wm4@mplayer2.org>2012-01-18 04:21:58 +0100
commit6e41497d5be1f107c18b2143fa45b3c46d6e95d3 (patch)
treeba18bcab5e209d3c48658bac046fa48a9c5f053a /command.c
parent064f8c2fb656462db9662c67bdbc6716958a4de4 (diff)
parentf7c2ecebccc4b3c5d6299aee5b8f4d382fa78987 (diff)
downloadmpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.bz2
mpv-6e41497d5be1f107c18b2143fa45b3c46d6e95d3.tar.xz
Merge branch 'softvol' into my_master
Diffstat (limited to 'command.c')
-rw-r--r--command.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/command.c b/command.c
index 58dd68454f..8c5d02e81d 100644
--- a/command.c
+++ b/command.c
@@ -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));
}
}