public abstract class SoundImpl<I> extends Sound
Sound.Error| Modifier and Type | Method and Description |
|---|---|
void |
fail(java.lang.Throwable error)
Configures this sound with an error in lieu of its platform implementation.
|
boolean |
isPlaying()
Determine whether this audio stream is currently playing.
|
boolean |
play()
If possible, begin playback of this audio stream.
|
boolean |
prepare()
Prepares this sound to be played by preloading it into audio buffers.
|
void |
release()
Releases resources used by this sound.
|
void |
setLooping(boolean looping)
Set whether audio stream playback should be looped indefinitely or not.
|
void |
setVolume(float volume) |
void |
stop()
Stop playback of the current audio stream as soon as possible, and reset the sound position to
its starting position, such that a subsequent call to
Sound.play() will cause the audio file
to being playback from the beginning of the audio stream. |
void |
succeed(I impl)
Configures this sound with its platform implementation.
|
float |
volume() |
public SoundImpl(Exec exec)
public void succeed(I impl)
public void fail(java.lang.Throwable error)
public boolean prepare()
SoundSound.play() start emitting sound with the lowest possible
latency.public boolean isPlaying()
Soundpublic boolean play()
Soundpublic void stop()
SoundSound.play() will cause the audio file
to being playback from the beginning of the audio stream.public void setLooping(boolean looping)
SoundsetLooping in class Soundlooping - true if the audio stream should be looped indefinitelypublic float volume()
public void setVolume(float volume)
public void release()
SoundCopyright © 2018. All Rights Reserved.