changeset 5848:48a0667742b9

volume setting with lame - patch by silicon@falcon.sch.bme.hu
author arpi
date Fri, 26 Apr 2002 20:19:31 +0000
parents 9f4e13b3bfb2
children 77a529bfc80e
files DOCS/mencoder.1 cfg-mencoder.h mencoder.c
diffstat 3 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/mencoder.1	Fri Apr 26 20:10:05 2002 +0000
+++ b/DOCS/mencoder.1	Fri Apr 26 20:19:31 2002 +0000
@@ -344,6 +344,7 @@
                  (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
--- a/cfg-mencoder.h	Fri Apr 26 20:10:05 2002 +0000
+++ b/cfg-mencoder.h	Fri Apr 26 20:19:31 2002 +0000
@@ -30,6 +30,7 @@
 	{"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}
 };
--- a/mencoder.c	Fri Apr 26 20:10:05 2002 +0000
+++ b/mencoder.c	Fri Apr 26 20:19:31 2002 +0000
@@ -179,6 +179,7 @@
 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_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);