mpv/core
wm4 62daa08d3b mplayer: keep volume persistent, even when using --volume
Consider:

    mpv --volume 10 file1.mkv file2.mkv

Before this commit, the volume was reset to 10 when playing file2.mkv.
This was inconsistent to most other options. E.g. --brightness is a
rather similar case.

In general, settings should never be reset when playing the next file,
unless the option was explicitly marked file-local. This commit
corrects the behavior of the --volume and --mute options.

File local --volume still works as expected:

    mpv --{ --volume 10 file1.mkv file2.mkv --}

This sets the volume always to 10 on playback start.

Move the m_config_leave_file_local() call down so that the mixer code
in uninit_player() can set the option volume and mute variables without
overwriting the global option values.

Another subtle issue is that we don't want to set volume if there's no
need to, which is why the user_set_volume/mute fields are introduced.
This is important because setting the volume might change the system
volume depending on other options.
2013-04-10 21:29:04 +02:00
..
input
timeline
asxparser.c
asxparser.h
av_common.c
av_common.h
av_log.c
av_log.h
av_opts.c
av_opts.h
bstr.c
bstr.h
cfg-mplayer.h core: remove volstep global variable 2013-04-09 02:41:46 +02:00
codecs.c
codecs.h
command.c command: fix loadlist command 2013-04-10 17:16:49 +02:00
command.h
cpudetect.c
cpudetect.h
defaultopts.c core: remove volstep global variable 2013-04-09 02:41:46 +02:00
defaultopts.h
encode.h
encode_lavc.c
encode_lavc.h
m_config.c
m_config.h
m_option.c
m_option.h
m_property.c
m_property.h
m_struct.c
m_struct.h
mp_common.c
mp_common.h
mp_core.h
mp_fifo.c
mp_fifo.h
mp_msg.c
mp_msg.h
mp_osd.h
mp_talloc.h
mplayer.c mplayer: keep volume persistent, even when using --volume 2013-04-10 21:29:04 +02:00
mplayer.h
options.h core: remove volstep global variable 2013-04-09 02:41:46 +02:00
parser-cfg.c
parser-cfg.h
parser-mpcmd.c
parser-mpcmd.h
path.c
path.h
playlist.c
playlist.h
playlist_parser.c
playlist_parser.h
quvi.c
screenshot.c
screenshot.h
subopt-helper.c
subopt-helper.h
version.c