| Modifier and Type | Field and Description |
|---|---|
| private final OpenALLwjgl3Audio | |
| private int | |
| private int | |
| private float | |
| private int | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public float | |
| public int | |
| public int | |
| public String | |
| public long | |
| public long | |
| public long | loop(float volume, float pitch, float pan)
Implements com. Plays the sound, looping. |
| public void | |
| public void | pause(long soundId)
Implements com. Pauses the sound instance with the given id as returned by |
| public long | |
| public long | |
| public long | play(float volume, float pitch, float pan)
Implements com. Plays the sound. |
| public void | |
| public void | resume(long soundId)
Implements com. Resumes the sound instance with the given id as returned by |
| public void | setLooping(long soundId, boolean looping)
Implements com. Sets the sound instance with the given id to be looping. |
| public void | setPan(long soundId, float pan, float volume)
Implements com. Sets the panning and volume of the sound instance with the given id as returned by |
| public void | setPitch(long soundId, float pitch)
Implements com. Changes the pitch multiplier of the sound instance with the given id as returned by |
| public void | |
| pack-priv void | setup(byte[]
Byte array of raw PCM data to be played. pcm, int The number of channels for the sound. Most commonly 1 (for mono) or 2 (for stereo). channels, int The number of bits in each sample. Normally 16. Can also be 8, 32, 64. bitDepth, int The number of samples to be played each second. Commonly 44100; can be anything within reason. sampleRate)Prepare our sound for playback! |
| pack-priv void | |
| public void | setVolume(long soundId, float volume)
Implements com. Changes the volume of the sound instance with the given id as returned by |
| public void | |
| public void | stop(long soundId)
Implements com. Stops the sound instance with the given id as returned by |
| audio | back to summary |
|---|---|
| private final OpenALLwjgl3Audio audio | |
| bufferID | back to summary |
|---|---|
| private int bufferID | |
| channels | back to summary |
|---|---|
| private int channels | |
| duration | back to summary |
|---|---|
| private float duration | |
| sampleRate | back to summary |
|---|---|
| private int sampleRate | |
| type | back to summary |
|---|---|
| private String type | |
| OpenALSound | back to summary |
|---|---|
| public OpenALSound(OpenALLwjgl3Audio audio) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Doc from com. Releases all the resources. | |
| duration | back to summary |
|---|---|
| public float duration() Returns the length of the sound in seconds. | |
| getChannels | back to summary |
|---|---|
| public int getChannels() Returns the number of channels of the sound. Usually 1 for mono; 2 for stereo. | |
| getRate | back to summary |
|---|---|
| public int getRate() Returns the original sample rate of the sound in Hz. | |
| getType | back to summary |
|---|---|
| public String getType() | |
| loop | back to summary |
|---|---|
| public long loop() Implements com. Doc from com. Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. | |
| loop | back to summary |
|---|---|
| public long loop(float volume) Implements com. Doc from com. Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the
sound via a call to
| |
| loop | back to summary |
|---|---|
| public long loop(float volume, float pitch, float pan) Implements com. Doc from com. Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the
sound via a call to
| |
| pause | back to summary |
|---|---|
| public void pause() Implements com. Doc from com. Pauses all instances of this sound.
| |
| pause | back to summary |
|---|---|
| public void pause(long soundId) Implements com. Doc from com. Pauses the sound instance with the given id as returned by
| |
| play | back to summary |
|---|---|
| public long play() Implements com. Doc from com. Plays the sound. If the sound is already playing, it will be played again, concurrently. | |
| play | back to summary |
|---|---|
| public long play(float volume) Implements com. Doc from com. Plays the sound. If the sound is already playing, it will be played again, concurrently. | |
| play | back to summary |
|---|---|
| public long play(float volume, float pitch, float pan) Implements com. Doc from com. Plays the sound. If the sound is already playing, it will be played again, concurrently. Note that (with the exception of the web backend) panning only works for mono sounds, not for stereo sounds!
| |
| resume | back to summary |
|---|---|
| public void resume() Implements com. Doc from com. Resumes all paused instances of this sound.
| |
| resume | back to summary |
|---|---|
| public void resume(long soundId) Implements com. Doc from com. Resumes the sound instance with the given id as returned by
| |
| setLooping | back to summary |
|---|---|
| public void setLooping(long soundId, boolean looping) Implements com. Doc from com. Sets the sound instance with the given id to be looping. If the sound is no longer playing this has no effect.s
| |
| setPan | back to summary |
|---|---|
| public void setPan(long soundId, float pan, float volume) Implements com. Doc from com. Sets the panning and volume of the sound instance with the given id as returned by
| |
| setPitch | back to summary |
|---|---|
| public void setPitch(long soundId, float pitch) Implements com. Doc from com. Changes the pitch multiplier of the sound instance with the given id as returned by
| |
| setType | back to summary |
|---|---|
public void setType(String type)
| |
| setup | back to summary |
|---|---|
| pack-priv void setup(byte[] pcm, int channels, int bitDepth, int sampleRate) Prepare our sound for playback!
| |
| setup | back to summary |
|---|---|
| pack-priv void setup(ShortBuffer pcm, int channels, int bitDepth, int sampleRate) | |
| setVolume | back to summary |
|---|---|
| public void setVolume(long soundId, float volume) Implements com. Doc from com. Changes the volume of the sound instance with the given id as returned by
| |
| stop | back to summary |
|---|---|
| public void stop() Implements com. Doc from com. Stops playing all instances of this sound. | |
| stop | back to summary |
|---|---|
| public void stop(long soundId) Implements com. Doc from com. Stops the sound instance with the given id as returned by
| |