[pulseaudio-discuss] [PATCH RFCv3 42/51] mix: Length over all chunk has already been computed by the caller

Peter Meerwald pmeerw at pmeerw.net
Tue Nov 4 15:26:37 PST 2014


Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/pulsecore/mix.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c
index ae87ec9..c71bd2c 100644
--- a/src/pulsecore/mix.c
+++ b/src/pulsecore/mix.c
@@ -641,9 +641,8 @@ size_t pa_mix(
     }
 
     for (k = 0; k < nstreams; k++) {
+        pa_assert(length <= streams[k].chunk.length);
         streams[k].ptr = pa_memblock_acquire_chunk(&streams[k].chunk);
-        if (length > streams[k].chunk.length)
-            length = streams[k].chunk.length;
     }
 
     calc_stream_volumes_table[spec->format](streams, nstreams, volume, spec);
-- 
1.9.1



More information about the pulseaudio-discuss mailing list