public interface Sound
extends org.mini2Dx.gdx.utils.Disposable
| Modifier and Type | Method and Description |
|---|---|
long |
loop()
Loops the sound at full volume, center panning .
|
long |
loop(float volume)
Loops the sound at the specified volume, center panning.
|
long |
loop(float volume,
float pitch,
float pan)
Loops the sound at the specified volume, pitch and panning.
|
void |
pause()
Pauses all playing instances of this sound
|
void |
pause(long soundId)
Pauses the specific instance of this sound.
|
long |
play()
Plays the sound at full volume, center panning.
|
long |
play(float volume)
Plays the sound at the specified volume, center panning.
|
long |
play(float volume,
float pitch,
float pan)
Plays the sound at the specified volume, pitch and panning.
|
void |
resume()
Resumes all playing instances of this sound
|
void |
resume(long soundId)
Resumes the specific instance of this sound.
|
void |
setLooping(long soundId,
boolean looping)
Sets if the specific instance of this sound should loop.
|
void |
setPan(long soundId,
float pan,
float volume)
Sets the pan and volume of the specific instance of this sound.
|
void |
setPitch(long soundId,
float pitch)
Sets the pitch of the specific instance of this sound.
|
void |
setVolume(long soundId,
float volume)
Sets the volume of the specific instance of this sound.
|
void |
stop()
Stops all playing instances of this sound
|
void |
stop(long soundId)
Stops the specific instance of this sound.
|
long play()
long play(float volume)
volume - The volume to play at where 0.0 is silent and 1.0 is full volumelong play(float volume,
float pitch,
float pan)
volume - The volume to play at where 0.0 is silent and 1.0 is full volumepitch - The pitch multiplier where 1.0 is default, >1 is faster and <1 is slower. The value range must be between 0.5 and 2.0pan - The panning where -1.0 is full left, 1.0 is full right and 0.0 is center.long loop()
long loop(float volume)
volume - The volume to play at where 0.0 is silent and 1.0 is full volumelong loop(float volume,
float pitch,
float pan)
volume - The volume to play at where 0.0 is silent and 1.0 is full volumepitch - The pitch multiplier where 1.0 is default, >1 is faster and <1 is slower. The value range must be between 0.5 and 2.0pan - The panning where -1.0 is full left, 1.0 is full right and 0.0 is center.void stop()
void pause()
void resume()
void stop(long soundId)
soundId - The sound ID that was returned when play/loop was calledvoid pause(long soundId)
soundId - The sound ID that was returned when play/loop was calledvoid resume(long soundId)
soundId - The sound ID that was returned when play/loop was calledvoid setLooping(long soundId,
boolean looping)
soundId - The sound ID that was returned when play/loop was calledlooping - True if the sound should loopvoid setPitch(long soundId,
float pitch)
soundId - The sound ID that was returned when play/loop was calledpitch - The pitch multiplier where 1.0 is default, >1 is faster and <1 is slower. The value range must be between 0.5 and 2.0void setVolume(long soundId,
float volume)
soundId - The sound ID that was returned when play/loop was calledvolume - The volume to play at where 0.0 is silent and 1.0 is full volumevoid setPan(long soundId,
float pan,
float volume)
soundId - The sound ID that was returned when play/loop was calledpan - The panning where -1.0 is full left, 1.0 is full right and 0.0 is center.volume - The volume to play at where 0.0 is silent and 1.0 is full volume