summaryrefslogtreecommitdiffstats
path: root/cfg-mplayer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-18 21:41:22 +0200
committerwm4 <wm4@nowhere>2012-09-23 14:57:01 +0200
commit425ac31a3b07cbef79891d01a3655b9c6d7efa32 (patch)
tree840de031a7a68d781fcc5d4df8f70061e12abc29 /cfg-mplayer.h
parentc57883b71b959d7d5c1c1bade8b4234017c11d1e (diff)
downloadmpv-425ac31a3b07cbef79891d01a3655b9c6d7efa32.tar.bz2
mpv-425ac31a3b07cbef79891d01a3655b9c6d7efa32.tar.xz
softvol, ao_pulse: prefer ao_pulse volume control by default
--softvol is enabled by default. For most audio outputs, this is a good thing, as they have either their own (bad) soft volume implementation, or control the system mixer. With ao_pulse, the situation is a bit different: it supports per-application volume (i.e. volume control is not really global). More importantly, ao_pulse uses a rather large audio buffer, and changing the volume with mplayer's volume filter has a large delay. With the native ao_pulse volume control, it's instant, because PulseAudio's audio filtering happens at a later stage in its processing pipeline (inaccessible for mplayer). This means native volume control should really be allowed for ao_pulse, while it's the reverse for other audio outputs. Make --softvol a choice option, and add a new "auto" choice. This is default and will use PA's volume control with ao_pulse, and mplayer's volume filter otherwise (i.e. the old softvol behavior).
Diffstat (limited to 'cfg-mplayer.h')
-rw-r--r--cfg-mplayer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index ed3fef7304..a6b8e93647 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -587,7 +587,10 @@ const m_option_t mplayer_opts[]={
OPT_STRING("mixer", mixer_device, 0),
OPT_STRING("mixer-channel", mixer_channel, 0),
- OPT_MAKE_FLAGS("softvol", softvol, 0),
+ OPT_CHOICE("softvol", softvol, 0,
+ ({"no", SOFTVOL_NO},
+ {"yes", SOFTVOL_YES},
+ {"auto", SOFTVOL_AUTO})),
OPT_FLOATRANGE("softvol-max", softvol_max, 0, 10, 10000),
{"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
{"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},