Mercurial > mplayer.hg
changeset 13098:907fe1fdfc6c
Make the stepsize of volume changes, changeable by a commandline paarameter
author | attila |
---|---|
date | Mon, 23 Aug 2004 00:31:33 +0000 |
parents | c7afdb04c8c8 |
children | fa7b25325f7e |
files | DOCS/man/en/mplayer.1 cfg-mplayer.h mplayer.c |
diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Mon Aug 23 00:25:19 2004 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Aug 23 00:31:33 2004 +0000 @@ -1561,6 +1561,10 @@ .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)"
--- a/cfg-mplayer.h Mon Aug 23 00:25:19 2004 +0000 +++ b/cfg-mplayer.h Mon Aug 23 00:31:33 2004 +0000 @@ -47,6 +47,8 @@ extern int fakemono; // defined in dec_audio.c #endif +extern int volstep; + #ifdef HAVE_LIRC extern char *lirc_configfile; #endif @@ -190,6 +192,7 @@ {"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},
--- a/mplayer.c Mon Aug 23 00:25:19 2004 +0000 +++ b/mplayer.c Mon Aug 23 00:31:33 2004 +0000 @@ -529,6 +529,8 @@ #include "mixer.h" mixer_t mixer; +/// step size of mixer changes +int volstep = 3; #include "cfg-mplayer.h" @@ -1921,7 +1923,7 @@ } mixer.audio_out = audio_out; mixer.afilter = sh_audio ? sh_audio->afilter : NULL; - mixer.volstep = 3; + mixer.volstep = volstep; } current_module="av_init";