]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
compress.c: fix serious typo
authorAndre Noll <maan@systemlinux.org>
Wed, 4 Apr 2007 08:24:29 +0000 (10:24 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 4 Apr 2007 08:24:29 +0000 (10:24 +0200)
We always compute the peak using the _adjusted_ sample value.

compress.c

index 685c3ba902b3ac9251c519fa0d047c1f830dfbe6..63c9b00245998ed873ab6b1ad7ff506a358a8e86 100644 (file)
@@ -73,7 +73,7 @@ static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn)
                                pcd->peak = 0;
                        } else
                                if (adjusted_sample > pcd->peak)
-                                       pcd->peak = sample;
+                                       pcd->peak = adjusted_sample;
                } else {
                        adjusted_sample = -((-sample * pcd->current_gain)
                                >> gain_shift);