aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/JoalVersion.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/openal/JoalVersion.java')
-rw-r--r--src/java/com/jogamp/openal/JoalVersion.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/java/com/jogamp/openal/JoalVersion.java b/src/java/com/jogamp/openal/JoalVersion.java
index 2181242..0de3687 100644
--- a/src/java/com/jogamp/openal/JoalVersion.java
+++ b/src/java/com/jogamp/openal/JoalVersion.java
@@ -35,6 +35,7 @@ import com.jogamp.common.util.VersionUtil;
import com.jogamp.common.util.JogampVersion;
import com.jogamp.openal.util.ALHelpers;
+import java.util.Map;
import java.util.jar.Manifest;
public class JoalVersion extends JogampVersion {
@@ -125,6 +126,7 @@ public class JoalVersion extends JogampVersion {
}
final AL al = ALFactory.getAL(); // valid after makeContextCurrent(..)
final ALVersion alv = new ALVersion(al);
+ final ALExt alExt = ALFactory.getALExt();
alv.toString(true, sb);
sb.append("AL_EXTENSIONS ").append(al.alGetString(ALConstants.AL_EXTENSIONS));
@@ -132,6 +134,7 @@ public class JoalVersion extends JogampVersion {
final boolean enumerationExtIsPresent = alc.alcEnumerationExtIsPresent();
final boolean enumerateAllExtIsPresent = alc.alcEnumerateAllExtIsPresent();
final String enumExtAvailInfo = "(enumExt[def "+enumerationExtIsPresent+", all "+enumerateAllExtIsPresent+"])";
+ final boolean softEventsIsPresent = alc.alcSoftSystemEventsIsPresent();
{
final int[] iversion = { 0, 0 };
alc.alcGetIntegerv(device, ALCConstants.ALC_MAJOR_VERSION, 1, iversion, 0);
@@ -159,6 +162,25 @@ public class JoalVersion extends JogampVersion {
sb.append("ALC_DEF_CAPTURE Unknown ").append(enumExtAvailInfo);
}
sb.append(Platform.getNewline());
+ sb.append(ALHelpers.ALC_SOFT_system_events).append(" ")
+ .append(softEventsIsPresent ? "supported" : "unsupported");
+ sb.append(Platform.getNewline());
+ if (softEventsIsPresent) {
+ for (final Map.Entry<String, Integer> event : Map.of(
+ "ALC_EVENT_TYPE_DEVICE_ADDED_SOFT", ALExtConstants.ALC_EVENT_TYPE_DEVICE_ADDED_SOFT,
+ "ALC_EVENT_TYPE_DEVICE_REMOVED_SOFT", ALExtConstants.ALC_EVENT_TYPE_DEVICE_REMOVED_SOFT,
+ "ALC_EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT", ALExtConstants.ALC_EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT
+ ).entrySet()) {
+ final int playbackSupported = alExt.alcEventIsSupportedSOFT(event.getValue(), ALExtConstants.ALC_PLAYBACK_DEVICE_SOFT);
+ sb.append(" ").append(event.getKey()).append(" event for playback devices is ")
+ .append(playbackSupported == ALExtConstants.ALC_EVENT_SUPPORTED_SOFT ? "supported" : "unsupported");
+ sb.append(Platform.getNewline());
+ final int captureSupported = alExt.alcEventIsSupportedSOFT(event.getValue(), ALExtConstants.ALC_CAPTURE_DEVICE_SOFT);
+ sb.append(" ").append(event.getKey()).append(" event for capture devices is ")
+ .append(captureSupported == ALExtConstants.ALC_EVENT_SUPPORTED_SOFT ? "supported" : "unsupported");
+ sb.append(Platform.getNewline());
+ }
+ }
}
if( null == initialContext ) {