aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/alc.cpp25
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))