[pulseaudio-commits] r2453 - /trunk/src/pulsecore/resampler.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat May 17 02:10:17 PDT 2008


Author: lennart
Date: Sat May 17 11:10:16 2008
New Revision: 2453

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2453&root=pulseaudio&view=rev
Log:
fix peak detection pseudo resampler

Modified:
    trunk/src/pulsecore/resampler.c

Modified: trunk/src/pulsecore/resampler.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/resampler.c?rev=2453&root=pulseaudio&r1=2452&r2=2453&view=diff
==============================================================================
--- trunk/src/pulsecore/resampler.c (original)
+++ trunk/src/pulsecore/resampler.c Sat May 17 11:10:16 2008
@@ -1457,10 +1457,10 @@
                         r->peaks.max_i[c] = n;
                 }
 
-            for (c = 0; c < r->o_ss.channels; c++, d++)
+            for (c = 0; c < r->o_ss.channels; c++, d++) {
                  *d = r->peaks.max_i[c];
-
-            memset(r->peaks.max_i, 0, sizeof(r->peaks.max_i));
+                 r->peaks.max_i[c] = 0;
+            }
         } else {
             unsigned i, c;
             float *s = (float*) ((uint8_t*) src + fz * j);
@@ -1476,11 +1476,13 @@
                         r->peaks.max_f[c] = n;
                 }
 
-            for (c = 0; c < r->o_ss.channels; c++, d++)
+            for (c = 0; c < r->o_ss.channels; c++, d++) {
                 *d = r->peaks.max_f[c];
-
-            memset(r->peaks.max_f, 0, sizeof(r->peaks.max_f));
+                r->peaks.max_f[c] = 0;
+            }
         }
+
+        start = j+1;
     }
 
     pa_memblock_release(input->memblock);




More information about the pulseaudio-commits mailing list