mirror of https://github.com/mpv-player/mpv
core: remove volstep global variable
This commit is contained in:
parent
dddb4e5ebd
commit
afbf29da1a
|
@ -543,7 +543,7 @@ const m_option_t mplayer_opts[]={
|
|||
{"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},
|
||||
OPT_INTRANGE("volstep", volstep, 0, 0, 100),
|
||||
OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 10000),
|
||||
OPT_CHOICE("mute", mixer_init_mute, M_OPT_OPTIONAL_PARAM,
|
||||
({"auto", -1},
|
||||
|
|
|
@ -16,6 +16,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
|||
.softvol_max = 200,
|
||||
.mixer_init_volume = -1,
|
||||
.mixer_init_mute = -1,
|
||||
.volstep = 3,
|
||||
.ao_buffersize = -1,
|
||||
.vo = {
|
||||
.video_driver_list = NULL,
|
||||
|
|
|
@ -368,9 +368,6 @@ static void print_file_properties(struct MPContext *mpctx, const char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
/// step size of mixer changes
|
||||
int volstep = 3;
|
||||
|
||||
// Time used to seek external tracks to.
|
||||
static double get_main_demux_pts(struct MPContext *mpctx)
|
||||
{
|
||||
|
@ -1599,7 +1596,7 @@ void reinit_audio_chain(struct MPContext *mpctx)
|
|||
"Couldn't find matching filter/ao format!\n");
|
||||
goto init_error;
|
||||
}
|
||||
mpctx->mixer.volstep = volstep;
|
||||
mpctx->mixer.volstep = opts->volstep;
|
||||
mpctx->mixer.softvol = opts->softvol;
|
||||
mpctx->mixer.softvol_max = opts->softvol_max;
|
||||
mixer_reinit(&mpctx->mixer, ao);
|
||||
|
|
|
@ -50,6 +50,7 @@ typedef struct MPOpts {
|
|||
int softvol;
|
||||
float mixer_init_volume;
|
||||
int mixer_init_mute;
|
||||
int volstep;
|
||||
float softvol_max;
|
||||
int gapless_audio;
|
||||
int ao_buffersize;
|
||||
|
|
Loading…
Reference in New Issue