Attempt to allow up to 31 channels of output, up from a limit of 8. Modify the mixdown setting so that "auto" only mixes downwards, e.g. 7.1 to 5.1, and never upwards, e.g. stereo to 5.1. Upmixing is not functional anyway, as the upmixing matrices are all such that the input channels are copied to their equivalent output channels and other output channels remain silent.

This commit is contained in:
Mike Brady
2026-05-07 14:06:00 +01:00
parent 281fb34d57
commit a50eed043e
3 changed files with 34 additions and 7 deletions
+2 -2
View File
@@ -458,7 +458,7 @@ uint32_t get_channel_settings(const char *stanza_name, const char *setting_name)
for (i = 0; i < channel_counts_count; i++) {
debug(3, "channel count setting %d: %d.", i, channel_counts[i]);
if ((channel_counts[i] >= 1) && (channel_counts[i] <= 8)) {
if ((channel_counts[i] >= 1) && (channel_counts[i] <= SPS_GREATEST_CHANNEL_COUNT)) {
#ifdef CONFIG_FFMPEG
channel_set |= (1 << channel_counts[i]);
#else
@@ -492,7 +492,7 @@ uint32_t get_channel_settings(const char *stanza_name, const char *setting_name)
char numbuf[32];
unsigned int c;
uint32_t t_channel_set = channel_set;
for (c = 0; c <= 8; c++) {
for (c = 0; c <= SPS_GREATEST_CHANNEL_COUNT; c++) {
if ((t_channel_set & (1 << c)) != 0) {
snprintf(numbuf, sizeof(numbuf) - 1, "%u", c);
snprintf(p, sizeof(buf) - (p - buf) - 1, "%s", numbuf);