1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

volume setting with lame - patch by silicon@falcon.sch.bme.hu

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5849 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-04-26 20:19:31 +00:00
parent 572e0f82c2
commit 9e195104fd
3 changed files with 7 additions and 0 deletions

View File

@ -344,6 +344,7 @@ Available options:
(0-highest, 9-low)
(for VBR)
ratio=XXX compression ratio <1-100>
vol=XXX set audio input gain <0-10>
mode=XXX 0=stereo
1=joint-stereo
2=dualchannel

View File

@ -30,6 +30,7 @@ struct config lameopts_conf[]={
{"padding", &lame_param_padding, CONF_TYPE_INT, CONF_RANGE, 0, PAD_MAX_INDICATOR, NULL},
{"br", &lame_param_br, CONF_TYPE_INT, CONF_RANGE, 0, 1024, NULL},
{"ratio", &lame_param_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
{"vol", &lame_param_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10, NULL},
{"help", "TODO: lameopts help!\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};

View File

@ -179,6 +179,7 @@ int lame_param_mode=-1; // unset
int lame_param_padding=-1; // unset
int lame_param_br=-1; // unset
int lame_param_ratio=-1; // unset
float lame_param_scale=-1; // unset
#endif
static int vo_w=0, vo_h=0;
@ -751,6 +752,10 @@ if(lame_param_vbr){ // VBR:
}
if(lame_param_mode>=0) lame_set_mode(lame,lame_param_mode); // j-st
if(lame_param_ratio>0) lame_set_compression_ratio(lame,lame_param_ratio);
if(lame_param_scale>0) {
printf("Setting audio input gain to %f\n", lame_param_scale);
lame_set_scale(lame,lame_param_scale);
}
lame_init_params(lame);
if(verbose){
lame_print_config(lame);