mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
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
This commit is contained in:
parent
0cadfe304f
commit
8d2a80047b
@ -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)"
|
||||
|
@ -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},
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user