From 8d2a80047b01ab454245907686e3734aa9dda049 Mon Sep 17 00:00:00 2001 From: attila Date: Mon, 23 Aug 2004 00:31:33 +0000 Subject: [PATCH] Make the stepsize of volume changes, changeable by a commandline paarameter git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13099 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 4 ++++ cfg-mplayer.h | 3 +++ mplayer.c | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 21b71fef68..298236eb76 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -1561,6 +1561,10 @@ For ALSA you can use the names e.g.\& alsamixer displays, like .B \-nowaveheader (\-ao pcm only) Don't include wave header. Used for raw PCM. +.TP +.B \-volstep <0\-100> +Set the step size of mixer volume changes in percent of the whole range. +Defaults to 3. . . .SH "AUDIO OUTPUT DRIVERS (MPLAYER ONLY)" diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 54946660f5..05ac9f98d4 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -47,6 +47,8 @@ extern int sdl_forcexv; extern int fakemono; // defined in dec_audio.c #endif +extern int volstep; + #ifdef HAVE_LIRC extern char *lirc_configfile; #endif @@ -190,6 +192,7 @@ m_option_t mplayer_opts[]={ {"dsp", "Use -ao oss:dsp_path.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL}, {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"mixer-channel", &mixer_channel, CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"master", "Option -master has been removed, use -aop list=volume instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, // override audio buffer size (used only by -ao oss, anyway obsolete...) {"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, diff --git a/mplayer.c b/mplayer.c index c8f9746634..95f9ccdce7 100644 --- a/mplayer.c +++ b/mplayer.c @@ -529,6 +529,8 @@ extern void mp_input_register_options(m_config_t* cfg); #include "mixer.h" mixer_t mixer; +/// step size of mixer changes +int volstep = 3; #include "cfg-mplayer.h" @@ -1921,7 +1923,7 @@ if(sh_audio){ } mixer.audio_out = audio_out; mixer.afilter = sh_audio ? sh_audio->afilter : NULL; - mixer.volstep = 3; + mixer.volstep = volstep; } current_module="av_init";