1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00
mpv/audio
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
..
decode Prefix CODEC_ID_ with AV_ 2013-03-13 23:51:30 +01:00
filter af_lavrresample: add new resampling filter to replace the old ones 2013-03-13 23:51:30 +01:00
out ao_dsound: add missing include 2013-03-23 21:04:27 +01:00
format.c audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
format.h audio: remove support for native alaw/mulaw/adpcm output 2012-12-11 00:37:54 +01:00
mixer.c mplayer: keep volume persistent, even when using --volume 2013-04-10 21:29:04 +02:00
mixer.h mplayer: keep volume persistent, even when using --volume 2013-04-10 21:29:04 +02:00
reorder_ch.c audio: make de-planarization faster 2012-12-28 13:43:55 +01:00
reorder_ch.h audio: make de-planarization faster 2012-12-28 13:43:55 +01:00