diff options
author | Chris Robinson <[email protected]> | 2010-07-30 20:23:55 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-07-30 20:23:55 -0700 |
commit | f1f2941511dd6bc51ea23ea46401bd75f70ac72e (patch) | |
tree | 77c87a024a119bb5b3b5b72db343c8ca9eea6824 /Alc/ALc.c | |
parent | d886fb118b7eac1c60597f6c915b5a3495c512b0 (diff) |
Add experimental device attributes for apps to query
These will be part of the ALC_EXT_device_time extension. Behavior, values,
etc, are all subject to change.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -1356,6 +1356,31 @@ ALC_API ALCvoid ALC_APIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsi *data = device->Connected; break; + case ALC_GET_TIME_EXT: + if(!IsDevice(device)) + alcSetError(device, ALC_INVALID_DEVICE); + else if(size < 2) + alcSetError(device, ALC_INVALID_VALUE); + else + { + ALuint64 t = ALCdevice_GetTime(device); + data[0] = t&0xffffffff; + data[1] = t>>32; + } + break; + + case ALC_GET_TIME_RES_EXT: + if(!IsDevice(device)) + alcSetError(device, ALC_INVALID_DEVICE); + else if(size < 2) + alcSetError(device, ALC_INVALID_VALUE); + else + { + data[0] = device->TimeRes&0xffffffff; + data[1] = device->TimeRes>>32; + } + break; + default: alcSetError(device, ALC_INVALID_ENUM); break; |