diff options
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/jogamp/openal/sound3d/Context.java | 8 | ||||
-rw-r--r-- | src/java/com/jogamp/openal/sound3d/Device.java | 12 | ||||
-rw-r--r-- | src/java/com/jogamp/openal/util/ALHelpers.java | 4 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/java/com/jogamp/openal/sound3d/Context.java b/src/java/com/jogamp/openal/sound3d/Context.java index 7e20263..48cbbe6 100644 --- a/src/java/com/jogamp/openal/sound3d/Context.java +++ b/src/java/com/jogamp/openal/sound3d/Context.java @@ -101,6 +101,14 @@ public final class Context { } /** + * Returns whether `AL_EXT_debug` is available for the current context. + * @see Device#isDebugAvail() + */ + public boolean isDebugAvail() { + return AudioSystem3D.al.alIsExtensionPresent(ALHelpers.AL_EXT_debug); + } + + /** * Creates the internal {@link ALCcontext} instance if {@link #getALContext()} is null * @param attributes lost of {@link ALCcontext} attributes for context creation * @return true if the internal context has been successfully created, otherwise false diff --git a/src/java/com/jogamp/openal/sound3d/Device.java b/src/java/com/jogamp/openal/sound3d/Device.java index 052d6a2..353ad5a 100644 --- a/src/java/com/jogamp/openal/sound3d/Device.java +++ b/src/java/com/jogamp/openal/sound3d/Device.java @@ -35,6 +35,7 @@ package com.jogamp.openal.sound3d; import com.jogamp.openal.*; +import com.jogamp.openal.util.ALHelpers; /** @@ -72,6 +73,17 @@ public final class Device { public boolean isValid() { return null != alDev; } /** + * Returns whether `ALC_EXT_debug` is available for this device. + * <p> + * This context may or may not be current. + * </p> + * @see Context#isDebugAvail() + */ + public boolean isDebugAvail() { + return AudioSystem3D.alc.alcIsExtensionPresent(alDev, ALHelpers.ALC_EXT_debug); + } + + /** * Opens the device if not yet opened * @return true if already open or newly opened * @see #isValid() diff --git a/src/java/com/jogamp/openal/util/ALHelpers.java b/src/java/com/jogamp/openal/util/ALHelpers.java index fda3167..011e5a7 100644 --- a/src/java/com/jogamp/openal/util/ALHelpers.java +++ b/src/java/com/jogamp/openal/util/ALHelpers.java @@ -55,6 +55,10 @@ public class ALHelpers { public static final String ALC_ENUMERATION_EXT = "ALC_ENUMERATION_EXT"; public static final String ALC_ENUMERATE_ALL_EXT = "ALC_ENUMERATE_ALL_EXT"; + public static final String ALC_EXT_debug = "ALC_EXT_debug"; + public static final String AL_EXT_debug = "AL_EXT_debug"; + public static final String ALC_SOFT_system_events = "ALC_SOFT_system_events"; + /** * Returns a compatible {@link AudioFormat} based on given OpenAL channel-layout, sample-type and format, * as well as the generic sample-rate and sample-size. |