compress: Warn when samples are clipped.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 18 Aug 2018 17:17:11 +0000 (19:17 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 2 Sep 2018 15:42:54 +0000 (17:42 +0200)
compress_filter.c

index d013259..f98fb41 100644 (file)
@@ -80,6 +80,7 @@ next_buffer:
                sample *= pcd->current_gain;
                sample >>= gain_shift;
                if (sample > 32767) { /* clip */
+                       PARA_WARNING_LOG("clip: %d\n", sample);
                        sample = 32767;
                        pcd->current_gain = (3 * pcd->current_gain +
                                (1 << inertia)) / 4;