|
JOAL v2.6.0-rc-20250706
JOAL, OpenAL® API Binding for Java (public API).
|
This class provides a Sound3D Context associated with a specified device. More...
Public Member Functions | |
| Context (final ALCcontext realContext, final Device device) | |
Creates a new Context for a given ALCcontext for the specified device. More... | |
| Context (final Device device, final int[] attributes) | |
Creates a new Context for a specified device including native ALCcontext creation. More... | |
| boolean | isDebugAvail () |
Returns whether AL_EXT_debug is available for the current context. More... | |
| boolean | create (final int[] attributes) |
Creates the internal ALCcontext instance if getALContext() is null. More... | |
| boolean | recreate (final int[] attributes) |
Recreates the internal ALCcontext instance, i.e. More... | |
| ALCcontext | getALContext () |
Returns the OpenAL ALCcontext. More... | |
| boolean | isValid () |
Returns whether getALContext() is valid, i.e. More... | |
| int | getALCError () |
Return ALC#alcGetError(ALCdevice) using getDevice(). More... | |
| void | destroy () |
| destroys this context freeing its resources. More... | |
| int | getLockCount () |
| Return the lock count of this context, i.e. More... | |
| boolean | tryMakeCurrent (final boolean throwException, final long timeoutMS) throws RuntimeException |
| boolean | makeCurrent (final boolean throwException) throws ALException |
| Makes the audio context current on the calling thread. More... | |
| boolean | release (final boolean throwException) throws ALException |
| Releases control of this audio context from the current thread, if implementation utilizes context locking. More... | |
| void | suspend () |
| Suspend this context. More... | |
| Device | getDevice () |
| Gets the device associated with this context. More... | |
| String | toString () |
Static Public Member Functions | |
| static Context | getCurrentContext () |
| Returns this thread current context. More... | |
Public Attributes | |
| final boolean | hasALC_thread_local_context |
This class provides a Sound3D Context associated with a specified device.
Definition at line 49 of file Context.java.
| com.jogamp.openal.sound3d.Context.Context | ( | final ALCcontext | realContext, |
| final Device | device | ||
| ) |
Creates a new Context for a given ALCcontext for the specified device.
| realContext | ALCcontext instance, maybe null |
| device | The device the Context belongs to, must be valid |
Definition at line 63 of file Context.java.
| com.jogamp.openal.sound3d.Context.Context | ( | final Device | device, |
| final int[] | attributes | ||
| ) |
Creates a new Context for a specified device including native ALCcontext creation.
| device | The device the Context is being created for, must be valid. |
| attributes | list of ALCcontext attributes for context creation, maybe empty or null |
Definition at line 85 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.create | ( | final int[] | attributes | ) |
Creates the internal ALCcontext instance if getALContext() is null.
| attributes | lost of ALCcontext attributes for context creation |
Definition at line 116 of file Context.java.
| void com.jogamp.openal.sound3d.Context.destroy | ( | ) |
destroys this context freeing its resources.
Definition at line 171 of file Context.java.
| int com.jogamp.openal.sound3d.Context.getALCError | ( | ) |
Return ALC#alcGetError(ALCdevice) using getDevice().
Definition at line 164 of file Context.java.
| ALCcontext com.jogamp.openal.sound3d.Context.getALContext | ( | ) |
Returns the OpenAL ALCcontext.
Definition at line 158 of file Context.java.
|
static |
Returns this thread current context.
If no context is current, returns null.
Definition at line 206 of file Context.java.
| Device com.jogamp.openal.sound3d.Context.getDevice | ( | ) |
Gets the device associated with this context.
Definition at line 341 of file Context.java.
| int com.jogamp.openal.sound3d.Context.getLockCount | ( | ) |
Return the lock count of this context, i.e.
0 if not locked, 1 if locked once, >1 for recursive locks.
Definition at line 211 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.isDebugAvail | ( | ) |
Returns whether AL_EXT_debug is available for the current context.
Definition at line 107 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.isValid | ( | ) |
Returns whether getALContext() is valid, i.e.
not null, e.g. not destroy()'ed.
Definition at line 161 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.makeCurrent | ( | final boolean | throwException | ) | throws ALException |
Makes the audio context current on the calling thread.
Recursive call to makeCurrent() and hence release() are supported.
At any point in time one context can only be current on one thread, and one thread can only have one context current.
| throwException | if true, throws ALException if getALContext() is null, current thread holds another context or failed to natively make current |
getALContext() is valid, current thread holds no other context and context successfully made current, otherwise false Definition at line 231 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.recreate | ( | final int[] | attributes | ) |
Recreates the internal ALCcontext instance, i.e.
destroys it first if getALContext() not null.
Context is made current again if it was current before.
| attributes | lost of ALCcontext attributes for context creation |
Definition at line 137 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.release | ( | final boolean | throwException | ) | throws ALException |
Releases control of this audio context from the current thread, if implementation utilizes context locking.
Recursive call to makeCurrent() and hence release() are supported.
If native release fails, internal lock is not released.
| throwException | if true, throws ALException if context has not been previously made current on current thread or native release failed. |
Definition at line 302 of file Context.java.
| void com.jogamp.openal.sound3d.Context.suspend | ( | ) |
Suspend this context.
Definition at line 332 of file Context.java.
| String com.jogamp.openal.sound3d.Context.toString | ( | ) |
Definition at line 346 of file Context.java.
| boolean com.jogamp.openal.sound3d.Context.tryMakeCurrent | ( | final boolean | throwException, |
| final long | timeoutMS | ||
| ) | throws RuntimeException |
Definition at line 215 of file Context.java.
| final boolean com.jogamp.openal.sound3d.Context.hasALC_thread_local_context |
Definition at line 54 of file Context.java.