[polypaudio-commits] r472 - /trunk/polyp/sink-input.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Feb 3 04:23:17 PST 2006


Author: ossman
Date: Fri Feb  3 13:23:17 2006
New Revision: 472

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=472&root=polypaudio&view=rev
Log:
Volume adjustment must be done _after_ dropping the chunk since drop will
reject a modified chunk.

Modified:
    trunk/polyp/sink-input.c

Modified: trunk/polyp/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/polyp/sink-input.c?rev=472&root=polypaudio&r1=471&r2=472&view=diff
==============================================================================
--- trunk/polyp/sink-input.c (original)
+++ trunk/polyp/sink-input.c Fri Feb  3 13:23:17 2006
@@ -222,20 +222,20 @@
             goto finish;
 
         assert(tchunk.length);
+        
+        l = pa_resampler_request(i->resampler, CONVERT_BUFFER_LENGTH);
+
+        if (l > tchunk.length)
+            l = tchunk.length;
+
+        i->drop(i, &tchunk, l);
+        tchunk.length = l;
 
         /* It might be necessary to adjust the volume here */
         if (do_volume_adj_here) {
             pa_memchunk_make_writable(&tchunk, i->sink->core->memblock_stat, 0);
             pa_volume_memchunk(&tchunk, &i->sample_spec, &i->volume);
         }
-        
-        l = pa_resampler_request(i->resampler, CONVERT_BUFFER_LENGTH);
-
-        if (l > tchunk.length)
-            l = tchunk.length;
-
-        i->drop(i, &tchunk, l);
-        tchunk.length = l;
 
         pa_resampler_run(i->resampler, &tchunk, &i->resampled_chunk);
         pa_memblock_unref(tchunk.memblock);




More information about the pulseaudio-commits mailing list