diff options
author | Sven Gothel <[email protected]> | 2023-11-28 12:08:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-11-28 12:08:55 +0100 |
commit | 1aa6f3080953eb4b3a4018b805a014c95dfce4dd (patch) | |
tree | 1d0035f9d1d9afd78d4234fd7dd5ccc14ffb4c86 /src/java/com | |
parent | 072c55ca78d57ce6cee44a83a78cffe1559f2b81 (diff) |
Bug 1475: Minor revision of orig patch-set
- Implement ALC.alcIsDoubleNullTerminatedString() in Java w/ our existing functionality,
drop JNI function
- JoalVersion.devicesToString(..) revert to original API
dropping boolean params
- C: Drop using stdbool.h, earmarked as obsolete in std
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/jogamp/openal/JoalVersion.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/java/com/jogamp/openal/JoalVersion.java b/src/java/com/jogamp/openal/JoalVersion.java index 6469189..77dcabf 100644 --- a/src/java/com/jogamp/openal/JoalVersion.java +++ b/src/java/com/jogamp/openal/JoalVersion.java @@ -131,6 +131,7 @@ public class JoalVersion extends JogampVersion { sb.append(Platform.getNewline()); final boolean enumerationExtIsPresent = alc.aclEnumerationExtIsPresent(); final boolean enumerateAllExtIsPresent = alc.aclEnumerateAllExtIsPresent(); + final String enumExtAvailInfo = "(enumExt[def "+enumerationExtIsPresent+", all "+enumerateAllExtIsPresent+"])"; { final int[] iversion = { 0, 0 }; alc.alcGetIntegerv(device, ALCConstants.ALC_MAJOR_VERSION, 1, iversion, 0); @@ -138,8 +139,7 @@ public class JoalVersion extends JogampVersion { sb.append("ALC_VERSION ").append(iversion[0]).append(".").append(iversion[1]); sb.append(Platform.getNewline()); if (!enumerationExtIsPresent && !enumerateAllExtIsPresent) { - sb.append("ALC_DEF_OUTPUT Unknown (Missing "+ - ALHelpers.ALC_ENUMERATION_EXT+" and "+ALHelpers.ALC_ENUMERATE_ALL_EXT+")"); + sb.append("ALC_DEF_OUTPUT Unknown ").append(enumExtAvailInfo); sb.append(Platform.getNewline()); } else { if (enumerationExtIsPresent) { @@ -155,11 +155,10 @@ public class JoalVersion extends JogampVersion { } if (enumerationExtIsPresent) { sb.append("ALC_DEF_CAPTURE ").append(alc.alcGetString(device, ALCConstants.ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)); - sb.append(Platform.getNewline()); } else { - sb.append("ALC_DEF_CAPTURE Unknown (Missing "+ALHelpers.ALC_ENUMERATION_EXT+")"); - sb.append(Platform.getNewline()); + sb.append("ALC_DEF_CAPTURE Unknown ").append(enumExtAvailInfo); } + sb.append(Platform.getNewline()); } if( null == initialContext ) { @@ -168,7 +167,7 @@ public class JoalVersion extends JogampVersion { alc.alcCloseDevice(device); } - devicesToString(sb, alc, enumerationExtIsPresent, enumerateAllExtIsPresent); + devicesToString(sb, alc); return sb; } @@ -268,10 +267,13 @@ public class JoalVersion extends JogampVersion { } } - public static void devicesToString(final StringBuilder sb, final ALC alc, final boolean enumerationExtIsPresent, final boolean enumerateAllExtIsPresent) { + public static void devicesToString(final StringBuilder sb, final ALC alc) { + final boolean enumerationExtIsPresent = alc.aclEnumerationExtIsPresent(); + final boolean enumerateAllExtIsPresent = alc.aclEnumerateAllExtIsPresent(); + final String enumExtAvailInfo = "(enumExt[def "+enumerationExtIsPresent+", all "+enumerateAllExtIsPresent+"])"; + if (!enumerationExtIsPresent && !enumerateAllExtIsPresent) { - sb.append("No output devices infos available (Missing "+ - ALHelpers.ALC_ENUMERATION_EXT+" and "+ALHelpers.ALC_ENUMERATE_ALL_EXT+")"); + sb.append("No output devices infos available ").append(enumExtAvailInfo); } else { if (enumerateAllExtIsPresent) { final String defOutAllDeviceName = alc.alcGetString(null, ALCConstants.ALC_DEFAULT_ALL_DEVICES_SPECIFIER); @@ -299,7 +301,7 @@ public class JoalVersion extends JogampVersion { } } if (!enumerationExtIsPresent) { - sb.append("No capture devices infos available (Missing " + ALHelpers.ALC_ENUMERATION_EXT + ")"); + sb.append("No capture devices infos available ").append(enumExtAvailInfo); } else { final String defInDeviceName = alc.alcGetString(null, ALCConstants.ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER); sb.append("Capture devices:" + System.lineSeparator()); |