summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-09-04 12:22:30 +0200
committerWim Taymans <wtaymans@redhat.com>2020-09-04 12:22:30 +0200
commit3eafa6312fa19807a07f04bcd243d22873b51668 (patch)
tree0b4ea74da23c85dd24faac055e8e8d0bb78414f4
parent950e81c5fbf55170a64e32d75ad4bfed738142e5 (diff)
channelmix: add default channelmap for 5 and 7 channels
-rw-r--r--spa/plugins/audioconvert/channelmix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c
index d30b397d..a215c113 100644
--- a/spa/plugins/audioconvert/channelmix.c
+++ b/spa/plugins/audioconvert/channelmix.c
@@ -168,14 +168,17 @@ static uint64_t default_mask(uint32_t channels)
{
uint64_t mask = 0;
switch (channels) {
+ case 7:
case 8:
mask |= _MASK(RL);
mask |= _MASK(RR);
/* fallthrough */
+ case 5:
case 6:
mask |= _MASK(SL);
mask |= _MASK(SR);
- mask |= _MASK(LFE);
+ if ((channels & 1) == 0)
+ mask |= _MASK(LFE);
/* fallthrough */
case 3:
mask |= _MASK(FC);