diff options
author | Jyri Sarha <jyri.sarha@nokia.com> | 2009-05-14 09:42:52 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-06-07 02:06:44 +0200 |
commit | 8eaea3aa6471b7d0e78d110752847db5b213c85a (patch) | |
tree | c32f5c260c636daba519f6bcfb166b5e1d574030 | |
parent | 8adf1d5eea0750cea52a5ce8fb75d4331bf8a7cc (diff) |
optimization: Optimized pa_sink_render_full.
This is finally the latest version of the patch.
-rw-r--r-- | src/pulsecore/sink.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 141084d6..db9b4f3a 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1025,14 +1025,13 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) { pa_memchunk chunk; size_t l, d; pa_memchunk_make_writable(result, length); - result->length = length; l = length - result->length; d = result->index + result->length; while (l > 0) { chunk = *result; - chunk.index += d; - chunk.length -= d - result->index; + chunk.index = d; + chunk.length = l; pa_sink_render_into(s, &chunk); |