mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
mix: Combine loops over streams in pa_mix()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
9fa000bbfc
commit
b123cfa7c9
1 changed files with 4 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue