diff options
-rw-r--r-- | Alc/ALc.c | 36 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 20 |
2 files changed, 18 insertions, 38 deletions
@@ -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 ************************************************/ diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 776fb37b..a4ca829f 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -32,25 +32,21 @@ #ifndef ALC_SOFT_loopback2 #define ALC_SOFT_loopback2 1 -#define ALC_AMBISONIC_LAYOUT_SOFT 0x1997 -#define ALC_AMBISONIC_SCALING_SOFT 0x1998 -#define ALC_AMBISONIC_ORDER_SOFT 0x1999 +#define ALC_AMBISONIC_LAYOUT_SOFT 0xfff0 +#define ALC_AMBISONIC_SCALING_SOFT 0xfff1 +#define ALC_AMBISONIC_ORDER_SOFT 0xfff2 +#define ALC_MAX_AMBISONIC_ORDER_SOFT 0xfff3 #define ALC_BFORMAT3D_SOFT 0x1508 /* Ambisonic layouts */ -#define ALC_ACN_SOFT 0x1600 -#define ALC_FUMA_SOFT 0x1601 +#define ALC_ACN_SOFT 0xfff4 +#define ALC_FUMA_SOFT 0xfff5 /* Ambisonic scalings (normalization) */ /*#define ALC_FUMA_SOFT*/ -#define ALC_SN3D_SOFT 0x1602 -#define ALC_N3D_SOFT 0x1603 - -typedef ALCboolean (ALC_APIENTRY*LPALCISAMBISONICFORMATSUPPORTEDSOFT)(ALCdevice *device, ALCenum layout, ALCenum scaling, ALsizei order); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCboolean ALC_APIENTRY alcIsAmbisonicFormatSupportedSOFT(ALCdevice *device, ALCenum layout, ALCenum scaling, ALsizei order); -#endif +#define ALC_SN3D_SOFT 0xfff6 +#define ALC_N3D_SOFT 0xfff7 #endif #ifndef ALC_SOFT_device_clock |