diff options
author | wm4 <wm4@nowhere> | 2013-04-09 02:41:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-04-09 02:41:46 +0200 |
commit | afbf29da1ac18a78931dd21b49b2504a528a92a9 (patch) | |
tree | aacde77c3828fe0f2b3a3094cfcd0958b1e9c9e7 /core | |
parent | dddb4e5ebdaa419115bb35a3a540818a5fcfbb0a (diff) | |
download | mpv-afbf29da1ac18a78931dd21b49b2504a528a92a9.tar.bz2 mpv-afbf29da1ac18a78931dd21b49b2504a528a92a9.tar.xz |
core: remove volstep global variable
Diffstat (limited to 'core')
-rw-r--r-- | core/cfg-mplayer.h | 2 | ||||
-rw-r--r-- | core/defaultopts.c | 1 | ||||
-rw-r--r-- | core/mplayer.c | 5 | ||||
-rw-r--r-- | core/options.h | 1 |
4 files changed, 4 insertions, 5 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index a85f83ac36..dd99e6c4bd 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -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}, diff --git a/core/defaultopts.c b/core/defaultopts.c index b5bac128dd..71ce2ed812 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -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, diff --git a/core/mplayer.c b/core/mplayer.c index 3833d0a7da..6dffc4c010 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -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); diff --git a/core/options.h b/core/options.h index c92420bf92..080ca021d7 100644 --- a/core/options.h +++ b/core/options.h @@ -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; |