mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
filter-chain: fix gain when mixing 1 source
The gain was not used when mixing just one source.
This commit is contained in:
parent
c4944dad17
commit
ee8cb6aa67
2 changed files with 1 additions and 4 deletions
|
|
@ -63,9 +63,6 @@ void dsp_mix_gain_c(struct dsp_ops *ops,
|
|||
uint32_t i;
|
||||
if (n_src == 0) {
|
||||
dsp_clear_c(ops, dst, n_samples);
|
||||
} else if (n_src == 1) {
|
||||
if (dst != src[0])
|
||||
dsp_copy_c(ops, dst, src[0], n_samples);
|
||||
} else {
|
||||
if (gain[0] == 1.0f)
|
||||
dsp_copy_c(ops, dst, src[0], n_samples);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void dsp_mix_gain_sse(struct dsp_ops *ops,
|
|||
{
|
||||
if (n_src == 0) {
|
||||
memset(dst, 0, n_samples * sizeof(float));
|
||||
} else if (n_src == 1) {
|
||||
} else if (n_src == 1 && gain[0] == 1.0f) {
|
||||
if (dst != src[0])
|
||||
spa_memcpy(dst, src[0], n_samples * sizeof(float));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue