diff options
Diffstat (limited to 'make/config')
-rw-r--r-- | make/config/joal-alc-CustomJavaCode.java | 19 | ||||
-rw-r--r-- | make/config/joal-alc-impl-CustomCCode.c | 12 |
2 files changed, 30 insertions, 1 deletions
diff --git a/make/config/joal-alc-CustomJavaCode.java b/make/config/joal-alc-CustomJavaCode.java index be28d8c..6615c01 100644 --- a/make/config/joal-alc-CustomJavaCode.java +++ b/make/config/joal-alc-CustomJavaCode.java @@ -1,3 +1,18 @@ +/** Specify if ALC_ENUMERATION_EXT is present */ +public boolean aclEnumerationExtIsPresent(); + +/** Specify if ALC_ENUMERATE_ALL_EXT is present */ +public boolean aclEnumerateAllExtIsPresent(); + +/** Specify if call of alGetString(device, param) must + must retrun a double null terminted string */ +public boolean alcIsDoubleNullTerminatedString(final com.jogamp.openal.ALCdevice device, final int param); + +/** Fetches all values of device and param supplied from result of call to alcGetString + Each value is extracted from string because is a string double null terminated + Equivalent to the C call alcGetString(device, param). */ +public java.lang.String[] alcGetStringAsDoubleNullTerminatedString(final com.jogamp.openal.ALCdevice device, final int param); + /** Fetches the names of the available ALC device specifiers. Equivalent to the C call alcGetString(NULL, ALC_DEVICE_SPECIFIER). */ public java.lang.String[] alcGetDeviceSpecifiers(); @@ -5,3 +20,7 @@ public java.lang.String[] alcGetDeviceSpecifiers(); /** Fetches the names of the available ALC capture device specifiers. Equivalent to the C call alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER). */ public java.lang.String[] alcGetCaptureDeviceSpecifiers(); + +/** Fetches the names of the available ALC all capture device specifiers. + Equivalent to the C call alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER). */ +public java.lang.String[] alcGetAllDeviceSpecifiers(); diff --git a/make/config/joal-alc-impl-CustomCCode.c b/make/config/joal-alc-impl-CustomCCode.c index 9207210..bd4a57a 100644 --- a/make/config/joal-alc-impl-CustomCCode.c +++ b/make/config/joal-alc-impl-CustomCCode.c @@ -1,6 +1,16 @@ +#include <stdbool.h> + +bool alc_is_double_null_terminated_string(ALCdevice *device, int param) { + return device == NULL && ( + param == ALC_DEVICE_SPECIFIER || + param == ALC_CAPTURE_DEVICE_SPECIFIER || + param == ALC_ALL_DEVICES_SPECIFIER + ); +} + int strlen_alc(ALCdevice *device, int param, const char* str) { int len = 0; - if ((device == NULL) && (param == ALC_DEVICE_SPECIFIER)) { + if (alc_is_double_null_terminated_string(device, param)) { while (*str != 0) { while (*str != 0) { ++str; |