diff libmpcodecs/ad_liba52.c @ 31220:002cdc635c03

Use the -a52drc option also for the libavcodec decoder.
author reimar
date Sun, 30 May 2010 16:46:31 +0000
parents 1aece15222b5
children 9986a61354e6
line wrap: on
line diff
--- a/libmpcodecs/ad_liba52.c	Sun May 30 14:29:18 2010 +0000
+++ b/libmpcodecs/ad_liba52.c	Sun May 30 16:46:31 2010 +0000
@@ -54,8 +54,6 @@
 
 /** The output is multiplied by this var.  Used for volume control */
 static sample_t a52_level = 1;
-/** The value of the -a52drc switch. */
-float a52_drc_level = 1.0;
 static int a52_drc_action = DRC_NO_ACTION;
 
 static const ad_info_t info =
@@ -136,8 +134,8 @@
 
 static sample_t dynrng_call (sample_t c, void *data)
 {
-//	fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)a52_drc_level, (double)pow((double)c, a52_drc_level));
-	return pow((double)c, a52_drc_level);
+//	fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)drc_level, (double)pow((double)c, drc_level));
+	return pow((double)c, drc_level);
 }
 
 
@@ -207,10 +205,10 @@
 
 
   /* Init a52 dynrng */
-  if (a52_drc_level < 0.001) {
+  if (drc_level < 0.001) {
 	  /* level == 0 --> no compression, init library without callback */
 	  a52_drc_action = DRC_NO_COMPRESSION;
-  } else if (a52_drc_level > 0.999) {
+  } else if (drc_level > 0.999) {
 	  /* level == 1 --> full compression, do nothing at all (library default = full compression) */
 	  a52_drc_action = DRC_NO_ACTION;
   } else {