core: remove volstep global variable

This commit is contained in:
wm4 2013-04-09 02:41:46 +02:00
parent dddb4e5ebd
commit afbf29da1a
4 changed files with 4 additions and 5 deletions

View File

@ -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},

View File

@ -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,

View File

@ -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);

View File

@ -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;