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 685c3ba..63c9b00 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);