aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-30 08:54:49 -0700
committerChris Robinson <[email protected]>2017-04-30 08:54:49 -0700
commit8d50b72d8ffeff6e8ba155ca46e9d4287c82e88e (patch)
treec566d9a39771a8bea743453cf2725252dde3beec /Alc
parentfc2afa1eaab1dd29833c74e720210d54a6a449bd (diff)
Allow querying the output limiter state
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 6644f271..d5286f4f 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -3015,8 +3015,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 23;
- return 17;
+ return 25;
+ return 19;
}
static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values)
@@ -3162,6 +3162,9 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
values[i++] = ALC_HRTF_STATUS_SOFT;
values[i++] = device->HrtfStatus;
+
+ values[i++] = ALC_OUTPUT_LIMITER_SOFT;
+ values[i++] = (device->LimiterGain > 0.0f) ? ALC_TRUE : ALC_FALSE;
almtx_unlock(&device->BackendLock);
values[i++] = 0;
@@ -3268,6 +3271,10 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
almtx_unlock(&device->BackendLock);
return 1;
+ case ALC_OUTPUT_LIMITER_SOFT:
+ values[0] = (device->LimiterGain > 0.0f) ? ALC_TRUE : ALC_FALSE;
+ return 1;
+
default:
alcSetError(device, ALC_INVALID_ENUM);
return 0;
@@ -3372,6 +3379,9 @@ ALC_API void ALC_APIENTRY alcGetInteger64vSOFT(ALCdevice *device, ALCenum pname,
values[i++] = ALC_HRTF_STATUS_SOFT;
values[i++] = device->HrtfStatus;
+ values[i++] = ALC_OUTPUT_LIMITER_SOFT;
+ values[i++] = (device->LimiterGain > 0.0f) ? ALC_TRUE : ALC_FALSE;
+
clock = V0(device->Backend,getClockLatency)();
values[i++] = ALC_DEVICE_CLOCK_SOFT;
values[i++] = clock.ClockTime;