gst/audioconvert/gstchannelmix.c: Normalize using absolute values.
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 28 Nov 2004 19:22:07 +0000 (19:22 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sun, 28 Nov 2004 19:22:07 +0000 (19:22 +0000)
Original commit message from CVS:
* gst/audioconvert/gstchannelmix.c:
(gst_audio_convert_fill_normalize):
Normalize using absolute values.

ChangeLog
gst/audioconvert/gstchannelmix.c

index 1d88d93..070ab4a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-28  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+       * gst/audioconvert/gstchannelmix.c:
+       (gst_audio_convert_fill_normalize):
+         Normalize using absolute values.
+
 2004-11-28  Julien MOUTTE  <julien@moutte.net>
 
        * configure.ac:
index 705cfad..f78acf2 100644 (file)
@@ -438,7 +438,7 @@ gst_audio_convert_fill_normalize (GstAudioConvert * this)
     /* calculate sum */
     sum = 0.0;
     for (i = 0; i < this->sinkcaps.channels; i++) {
-      sum += this->matrix[i][j];
+      sum += fabs (this->matrix[i][j]);
     }
     if (sum > top) {
       top = sum;