|
JOAL v2.6.0-rc-20250712
JOAL, OpenAL® API Binding for Java (public API).
|
The AudioSystem3D class provides a set of methods for creating and manipulating a 3D audio environment. More...
Static Public Member Functions | |
| static void | init () throws ALException |
| Initialize the Sound3D environment. More... | |
| static boolean | isAvailable () |
Returns the available state of this instance. More... | |
| static final AL | getAL () |
Return OpenAL global AL. More... | |
| static final ALC | getALC () |
Return OpenAL global ALC. More... | |
| static final ALExt | getALExt () |
Return OpenAL global ALExt. More... | |
| static int | getALError () |
| static boolean | checkError (final Device device, final String prefix, final boolean verbose, final boolean throwException) |
| Returns true if an OpenAL ALC or AL error occurred, otherwise false. More... | |
| static boolean | checkALError (final String prefix, final boolean verbose, final boolean throwException) |
| Returns true if an OpenAL AL error occurred, otherwise false. More... | |
| static boolean | checkALCError (final Device device, final String prefix, final boolean verbose, final boolean throwException) |
| Returns true if an OpenAL ALC error occurred, otherwise false. More... | |
| static Context | createContext (final Device device) |
Creates a new Sound3D Context for a specified device including native ALCcontext creation. More... | |
| static Context | createContext (final Device device, final int[] attributes) |
Creates a new Sound3D Context for a specified device including native ALCcontext creation. More... | |
| static Context | getCurrentContext () |
| Returns this thread current context. More... | |
| static boolean | makeContextCurrent (final Context context, final boolean throwException) |
| Makes the audio context current on the calling thread. More... | |
| static boolean | releaseContext (final Context context, final boolean throwException) |
| Releases control of this audio context from the current thread, if implementation utilizes context locking. More... | |
| static Device | openDevice (final String deviceName) |
| Opens the named audio device. More... | |
| static Buffer[] | generateBuffers (final int numBuffers) |
| Generate an array of Sound3D buffers. More... | |
| static Buffer | loadBuffer (final String filename) throws IOException, UnsupportedAudioFileException |
| Loads a Sound3D buffer with the specified audio file. More... | |
| static Buffer | loadBuffer (InputStream stream) throws IOException, UnsupportedAudioFileException |
| Loads a Sound3D buffer with the specified audio file. More... | |
| static Source | loadSource (final String filename) throws IOException, UnsupportedAudioFileException |
| Loads a Sound3D Source with the specified audio file. More... | |
| static Source | loadSource (final InputStream stream) throws IOException, UnsupportedAudioFileException |
| Loads a Sound3D Source with the specified audio stream. More... | |
| static Source[] | generateSources (final int numSources) |
| Generates a set of uninitialized Source3D sources. More... | |
| static Source | generateSource (final Buffer buff) |
| Generate a Sound3D source from an initialized Buffer. More... | |
| static Listener | getListener () |
| Get the listener object associated with this Sound3D environment. More... | |
The AudioSystem3D class provides a set of methods for creating and manipulating a 3D audio environment.
Definition at line 62 of file AudioSystem3D.java.
|
static |
Returns true if an OpenAL ALC error occurred, otherwise false.
| device | referencing an ALCdevice, may be null |
| prefix | prefix to print on error and if verbose |
| verbose | pass true to show errors |
| throwException | true to throw an ALException on error |
Definition at line 161 of file AudioSystem3D.java.
|
static |
Returns true if an OpenAL AL error occurred, otherwise false.
| prefix | prefix to print on error and if verbose |
| verbose | pass true to show errors |
| throwException | true to throw an ALException on error |
Definition at line 139 of file AudioSystem3D.java.
|
static |
Returns true if an OpenAL ALC or AL error occurred, otherwise false.
| device | referencing an ALCdevice, may be null |
| prefix | prefix to print on error and if verbose |
| verbose | pass true to show errors |
| throwException | true to throw an ALException on error |
Definition at line 125 of file AudioSystem3D.java.
Creates a new Sound3D Context for a specified device including native ALCcontext creation.
| device | The device the Context is being created for, must be valid |
Definition at line 183 of file AudioSystem3D.java.
|
static |
Creates a new Sound3D 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 194 of file AudioSystem3D.java.
|
static |
Generate an array of Sound3D buffers.
| numBuffers | The number of Sound3D buffers to generate. |
Definition at line 264 of file AudioSystem3D.java.
Generate a Sound3D source from an initialized Buffer.
| buff | The buffer to be associate with the source. |
Definition at line 398 of file AudioSystem3D.java.
|
static |
Generates a set of uninitialized Source3D sources.
| numSources | the number of Sound3D sources to generate. |
Definition at line 379 of file AudioSystem3D.java.
|
static |
Return OpenAL global AL.
Definition at line 107 of file AudioSystem3D.java.
|
static |
Return OpenAL global ALC.
Definition at line 109 of file AudioSystem3D.java.
|
static |
|
static |
Return OpenAL global ALExt.
Definition at line 111 of file AudioSystem3D.java.
|
static |
Returns this thread current context.
If no context is current, returns null.
Definition at line 207 of file AudioSystem3D.java.
|
static |
Get the listener object associated with this Sound3D environment.
Definition at line 412 of file AudioSystem3D.java.
|
static |
Initialize the Sound3D environment.
Definition at line 95 of file AudioSystem3D.java.
|
static |
Returns the available state of this instance.
The available state is affected by this instance overall availability, i.e. after instantiation.
Definition at line 104 of file AudioSystem3D.java.
|
static |
Loads a Sound3D buffer with the specified audio file.
| filename | the name of the file to load. |
| IOException | If the file cannot be found or some other IO error occurs. |
| UnsupportedAudioFileException | If the format of the audio data is not supported |
Definition at line 289 of file AudioSystem3D.java.
|
static |
Loads a Sound3D buffer with the specified audio file.
| stream | contains the stream associated with the audio file. |
| IOException | If the stream cannot be read or some other IO error occurs. |
| UnsupportedAudioFileException | If the format of the audio data is not supported |
Definition at line 314 of file AudioSystem3D.java.
|
static |
Loads a Sound3D Source with the specified audio stream.
This is functionally equivalent to generateSource(loadBuffer(stream));
| stream | contains the stream associated with the audio file. |
| IOException | If the file cannot be found or some other IO error occurs. |
| UnsupportedAudioFileException | If the format of the audio data is not supported |
Definition at line 365 of file AudioSystem3D.java.
|
static |
Loads a Sound3D Source with the specified audio file.
This is functionally equivalent to generateSource(loadBuffer(fileName));
| filename | the name of the file to load. |
| IOException | If the file cannot be found or some other IO error occurs. |
| UnsupportedAudioFileException | If the format of the audio data is not supported |
Definition at line 344 of file AudioSystem3D.java.
|
static |
Makes the audio context current on the calling thread.
Recursive calls are supported.
At any point in time one context can only be current by one thread, and one thread can only have one context current.
| context | the context to make current. |
| throwException | if true, throws ALException if getALContext() is null, current thread holds another context or failed to natively make current |
Definition at line 226 of file AudioSystem3D.java.
|
static |
Opens the named audio device.
| deviceName | The specified device name, null for default. |
Definition at line 253 of file AudioSystem3D.java.
|
static |
Releases control of this audio context from the current thread, if implementation utilizes context locking.
Recursive calls are supported.
| context | the context to release. |
| throwException | if true, throws ALException if context has not been previously made current on current thread or native release failed. |
Definition at line 242 of file AudioSystem3D.java.