diff options
author | wm4 <wm4@nowhere> | 2012-11-15 19:22:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-16 21:21:15 +0100 |
commit | 25a098fe78ad2aee0ad7e18f8d4326e5cd29aeb1 (patch) | |
tree | eb7630929380192859eeae40d1671910b43bedfb /core/mplayer.c | |
parent | 1197e13c2f86ea0c521c206fa3412d50587376da (diff) | |
download | mpv-25a098fe78ad2aee0ad7e18f8d4326e5cd29aeb1.tar.bz2 mpv-25a098fe78ad2aee0ad7e18f8d4326e5cd29aeb1.tar.xz |
options: add --mute for setting initial audio mute status
Similar to --volume. Takes this as opportunity to move the variable
corresponding to --volume into MPOpts.
Diffstat (limited to 'core/mplayer.c')
-rw-r--r-- | core/mplayer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/mplayer.c b/core/mplayer.c index 3d38330c0a..d632bf5615 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -103,7 +103,6 @@ int slave_mode = 0; int enable_mouse_movements = 0; -float start_volume = -1; #include "osdep/priority.h" @@ -3947,8 +3946,11 @@ goto_enable_cache: audio_delay += mpctx->sh_video->stream_delay; } if (mpctx->sh_audio) { - if (start_volume >= 0) - mixer_setvolume(&mpctx->mixer, start_volume, start_volume); + if (opts->mixer_init_volume >= 0) + mixer_setvolume(&mpctx->mixer, opts->mixer_init_volume, + opts->mixer_init_volume); + if (opts->mixer_init_mute >= 0) + mixer_setmute(&mpctx->mixer, opts->mixer_init_mute); if (!ignore_start) audio_delay -= mpctx->sh_audio->stream_delay; } |