mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-27 21:37:37 -04:00
filter-graph: fix max plugin
It was reading src[1] twice for no good reason. Fixed it like the min plugin works.
This commit is contained in:
parent
a9d7023ec3
commit
4366621b78
1 changed files with 5 additions and 9 deletions
|
|
@ -2496,15 +2496,11 @@ static void max_run(void * Instance, unsigned long SampleCount)
|
||||||
} else if (n_srcs == 1) {
|
} else if (n_srcs == 1) {
|
||||||
spa_memcpy(out, src[0], SampleCount * sizeof(float));
|
spa_memcpy(out, src[0], SampleCount * sizeof(float));
|
||||||
} else {
|
} else {
|
||||||
for (p = 0; p < n_srcs; p++) {
|
for (n = 0; n < SampleCount; n++)
|
||||||
if (p == 0) {
|
out[n] = SPA_MAX(src[0][n], src[1][n]);
|
||||||
for (n = 0; n < SampleCount; n++)
|
for (p = 2; p < n_srcs; p++) {
|
||||||
out[n] = SPA_MAX(src[p][n], src[p + 1][n]);
|
for (n = 0; n < SampleCount; n++)
|
||||||
p++;
|
out[n] = SPA_MAX(out[n], src[p][n]);
|
||||||
} else {
|
|
||||||
for (n = 0; n < SampleCount; n++)
|
|
||||||
out[n] = SPA_MAX(out[n], src[p][n]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue