diff options
author | Chris Robinson <[email protected]> | 2018-12-24 07:33:38 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-24 07:33:38 -0800 |
commit | d49eeb576cbcba966f56aed0dccbdd4694ffbaf7 (patch) | |
tree | b6593fb953fb8e0a56e774371a0438aa0c5965b8 /Alc/alc.cpp | |
parent | 68352d318863105573e5022d1fc5383ac52f5de2 (diff) |
Only check ambisonic attributes with B-Format output
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r-- | Alc/alc.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp index a5353cb9..ad47e43c 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -1721,19 +1721,22 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) WARN("Missing format for loopback device\n"); return ALC_INVALID_VALUE; } - if(schans == ALC_BFORMAT3D_SOFT && (!alayout || !ascale || !aorder)) - { - WARN("Missing ambisonic info for loopback device\n"); - return ALC_INVALID_VALUE; - } if(!IsValidALCChannels(schans) || !IsValidALCType(stype) || freq < MIN_OUTPUT_RATE) return ALC_INVALID_VALUE; - if(!IsValidAmbiLayout(alayout) || !IsValidAmbiScaling(ascale)) - return ALC_INVALID_VALUE; - if(aorder < 1 || aorder > MAX_AMBI_ORDER) - return ALC_INVALID_VALUE; - if((alayout == ALC_FUMA_SOFT || ascale == ALC_FUMA_SOFT) && aorder > 3) - return ALC_INVALID_VALUE; + if(schans == ALC_BFORMAT3D_SOFT) + { + if(!alayout || !ascale || !aorder) + { + WARN("Missing ambisonic info for loopback device\n"); + return ALC_INVALID_VALUE; + } + if(!IsValidAmbiLayout(alayout) || !IsValidAmbiScaling(ascale)) + return ALC_INVALID_VALUE; + if(aorder < 1 || aorder > MAX_AMBI_ORDER) + return ALC_INVALID_VALUE; + if((alayout == ALC_FUMA_SOFT || ascale == ALC_FUMA_SOFT) && aorder > 3) + return ALC_INVALID_VALUE; + } } if((device->Flags&DEVICE_RUNNING)) |