From 425ac31a3b07cbef79891d01a3655b9c6d7efa32 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 18 Sep 2012 21:41:22 +0200 Subject: 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). --- defaultopts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'defaultopts.c') diff --git a/defaultopts.c b/defaultopts.c index 672dbd5f5c..422841ad65 100644 --- a/defaultopts.c +++ b/defaultopts.c @@ -3,6 +3,7 @@ #include "config.h" #include "defaultopts.h" #include "options.h" +#include "mixer.h" void set_default_mplayer_options(struct MPOpts *opts) { @@ -10,7 +11,7 @@ void set_default_mplayer_options(struct MPOpts *opts) .audio_driver_list = NULL, .video_driver_list = NULL, .fixed_vo = 1, - .softvol = 1, + .softvol = SOFTVOL_AUTO, .softvol_max = 200, .ao_buffersize = -1, .vo_wintitle = "mplayer - ${filename}", -- cgit v1.2.3