aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/panning.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index 90122550..c3145cd7 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -390,6 +390,13 @@ static bool LoadChannelSetup(ALCdevice *device)
AmbDecConf conf;
ALuint i, j;
+ /* Don't use custom decoders with mono or stereo output (stereo is using
+ * UHJ or pair-wise panning, thus ignores the custom coefficients anyway,
+ * and mono would realistically only specify attenuation on the output).
+ */
+ if(device->FmtChans == DevFmtMono || device->FmtChans == DevFmtStereo)
+ return false;
+
layout = GetChannelLayoutName(device->FmtChans);
if(!layout) return false;
@@ -629,6 +636,12 @@ ALvoid aluInitPanning(ALCdevice *device)
ambdec_init(&conf);
+ /* Don't do HQ ambisonic decoding with mono or stereo output. Same
+ * reasons as in LoadChannelSetup.
+ */
+ if(device->FmtChans == DevFmtMono || device->FmtChans == DevFmtStereo)
+ goto ambi_fail;
+
layout = GetChannelLayoutName(device->FmtChans);
if(!layout) goto ambi_fail;