aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-27 11:58:36 -0700
committerChris Robinson <[email protected]>2017-09-27 11:58:36 -0700
commit296abf03deb091c3371b1ca3370d6aed13356352 (patch)
treec5e08edb2cce5679a58701ebdcd540ec6e31b146 /Alc/ALc.c
parent1ab890262168444c2f6e1a9d84c3d65e5afe37f5 (diff)
Avoid a separate function to query ambisonic mode support
Now FuMa and ACN channel orders are required, as are FuMa, SN3D, and N3D normalization schemes. An integer query (alcGetIntegerv) is added for the maximum ambisonic order.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 7b4c1cfc..ce393d4b 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -145,8 +145,6 @@ static const struct {
DECL(alcIsRenderFormatSupportedSOFT),
DECL(alcRenderSamplesSOFT),
- DECL(alcIsAmbisonicFormatSupportedSOFT),
-
DECL(alcDevicePauseSOFT),
DECL(alcDeviceResumeSOFT),
@@ -3116,8 +3114,8 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *Device, ALCenum para
static inline ALCsizei NumAttrsForDevice(ALCdevice *device)
{
if(device->Type == Loopback && device->FmtChans == DevFmtAmbi3D)
- return 25;
- return 19;
+ return 27;
+ return 21;
}
static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values)
@@ -3154,6 +3152,7 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
case ALC_AMBISONIC_LAYOUT_SOFT:
case ALC_AMBISONIC_SCALING_SOFT:
case ALC_AMBISONIC_ORDER_SOFT:
+ case ALC_MAX_AMBISONIC_ORDER_SOFT:
alcSetError(NULL, ALC_INVALID_DEVICE);
return 0;
@@ -3204,6 +3203,10 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
values[0] = alcEFXMinorVersion;
return 1;
+ case ALC_MAX_AMBISONIC_ORDER_SOFT:
+ values[0] = MAX_AMBI_ORDER;
+ return 1;
+
case ALC_ATTRIBUTES_SIZE:
values[0] = NumAttrsForDevice(device);
return 1;
@@ -3266,6 +3269,9 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
values[i++] = ALC_OUTPUT_LIMITER_SOFT;
values[i++] = device->Limiter ? ALC_TRUE : ALC_FALSE;
+
+ values[i++] = ALC_MAX_AMBISONIC_ORDER_SOFT;
+ values[i++] = MAX_AMBI_ORDER;
almtx_unlock(&device->BackendLock);
values[i++] = 0;
@@ -4564,28 +4570,6 @@ FORCE_ALIGN ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, AL
/************************************************
- * ALC loopback2 functions
- ************************************************/
-
-ALC_API ALCboolean ALC_APIENTRY alcIsAmbisonicFormatSupportedSOFT(ALCdevice *device, ALCenum layout, ALCenum scaling, ALsizei order)
-{
- ALCboolean ret = ALC_FALSE;
-
- if(!VerifyDevice(&device) || device->Type != Loopback)
- alcSetError(device, ALC_INVALID_DEVICE);
- else if(order <= 0)
- alcSetError(device, ALC_INVALID_VALUE);
- else
- {
- if(IsValidAmbiLayout(layout) && IsValidAmbiScaling(scaling) && order <= MAX_AMBI_ORDER)
- ret = ALC_TRUE;
- }
- if(device) ALCdevice_DecRef(device);
-
- return ret;
-}
-
-/************************************************
* ALC DSP pause/resume functions
************************************************/