summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/command.c b/command.c
index 7ce0e7e924..3c1805b412 100644
--- a/command.c
+++ b/command.c
@@ -756,18 +756,17 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg,
case M_PROPERTY_SET:
if (!arg)
return M_PROPERTY_ERROR;
- if ((!!*(int *) arg) != mpctx->mixer.muted)
- mixer_mute(&mpctx->mixer);
+ 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_mute(&mpctx->mixer);
+ mixer_setmute(&mpctx->mixer, !mixer_getmute(&mpctx->mixer));
mpctx->user_muted = mpctx->mixer.muted;
return M_PROPERTY_OK;
default:
- return m_property_flag(prop, action, arg, &mpctx->mixer.muted);
-
+ return m_property_flag_ro(prop, action, arg,
+ mixer_getmute(&mpctx->mixer));
}
}