mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
channelmix: use volume/mute when no channel volumes
When setting a volume without channel volumes, use the volume/mute instead of doing nothing.
This commit is contained in:
parent
b7928799e5
commit
25cf4d0a31
1 changed files with 6 additions and 0 deletions
|
|
@ -540,6 +540,12 @@ static void impl_channelmix_set_volume(struct channelmix *mix, float volume, boo
|
||||||
mix->matrix[i][j] = mix->matrix_orig[i][j] * volumes[i];
|
mix->matrix[i][j] = mix->matrix_orig[i][j] * volumes[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < dst_chan; i++) {
|
||||||
|
for (j = 0; j < src_chan; j++) {
|
||||||
|
mix->matrix[i][j] = mix->matrix_orig[i][j] * vol;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SPA_FLAG_SET(mix->flags, CHANNELMIX_FLAG_ZERO);
|
SPA_FLAG_SET(mix->flags, CHANNELMIX_FLAG_ZERO);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue