mix: Combine loops over streams in pa_mix()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald 2013-02-13 17:27:04 +01:00 committed by Tanu Kaskinen
parent 9fa000bbfc
commit b123cfa7c9

View file

@ -561,7 +561,6 @@ size_t pa_mix(
pa_cvolume full_volume;
unsigned k;
unsigned z;
void *end;
pa_assert(streams);
@ -577,12 +576,11 @@ size_t pa_mix(
return length;
}
for (k = 0; k < nstreams; k++)
for (k = 0; k < nstreams; k++) {
streams[k].ptr = pa_memblock_acquire_chunk(&streams[k].chunk);
for (z = 0; z < nstreams; z++)
if (length > streams[z].chunk.length)
length = streams[z].chunk.length;
if (length > streams[k].chunk.length)
length = streams[k].chunk.length;
}
end = (uint8_t*) data + length;