From a30b335beb55dcd08b33f5822eb35c02dd4e1ebf Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 29 Sep 2022 12:44:42 +0200 Subject: [PATCH] channelmix: leave volume unchanged for unknown channel volumes When we get an unknown number of channels, don't do anything, like it used to be. --- spa/plugins/audioconvert/channelmix-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/audioconvert/channelmix-ops.c b/spa/plugins/audioconvert/channelmix-ops.c index 885fa9bcc..025b2a8eb 100644 --- a/spa/plugins/audioconvert/channelmix-ops.c +++ b/spa/plugins/audioconvert/channelmix-ops.c @@ -540,7 +540,7 @@ static void impl_channelmix_set_volume(struct channelmix *mix, float volume, boo mix->matrix[i][j] = mix->matrix_orig[i][j] * volumes[i]; } } - } else { + } else if (n_channel_volumes == 0) { for (i = 0; i < dst_chan; i++) { for (j = 0; j < src_chan; j++) { mix->matrix[i][j] = mix->matrix_orig[i][j] * vol;