Modifier and Type | Field and Description |
---|---|
com.badlogic.gdx.audio.Sound |
sound |
Constructor and Description |
---|
LibgdxSound(com.badlogic.gdx.audio.Sound sound) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
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.
|
public long play()
Sound
public long play(float volume)
Sound
public long play(float volume, float pitch, float pan)
Sound
play
in interface Sound
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.public long loop()
Sound
public long loop(float volume)
Sound
public long loop(float volume, float pitch, float pan)
Sound
loop
in interface Sound
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.public void stop()
Sound
public void pause()
Sound
public void resume()
Sound
public void stop(long soundId)
Sound
public void pause(long soundId)
Sound
public void resume(long soundId)
Sound
public void setLooping(long soundId, boolean looping)
Sound
setLooping
in interface Sound
soundId
- The sound ID that was returned when play/loop was calledlooping
- True if the sound should looppublic void setPitch(long soundId, float pitch)
Sound
public void setVolume(long soundId, float volume)
Sound
public void setPan(long soundId, float pan, float volume)
Sound
public void dispose()
dispose
in interface org.mini2Dx.gdx.utils.Disposable