public class SoundHandleJme
extends java.lang.Object
implements de.lessvoid.nifty.spi.sound.SoundHandle
Constructor and Description |
---|
SoundHandleJme(AudioRenderer ar,
AssetManager am,
java.lang.String fileName)
For streaming music only.
|
SoundHandleJme(AudioRenderer ar,
AudioNode node) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
float |
getVolume() |
boolean |
isPlaying() |
void |
play() |
void |
setVolume(float f) |
void |
stop() |
public SoundHandleJme(AudioRenderer ar, AudioNode node)
public SoundHandleJme(AudioRenderer ar, AssetManager am, java.lang.String fileName)
ar
- for rendering audio (not null)am
- the AssetManager for loading assets (not null)fileName
- the path to the audio asset (not null)public void play()
play
in interface de.lessvoid.nifty.spi.sound.SoundHandle
public void stop()
stop
in interface de.lessvoid.nifty.spi.sound.SoundHandle
public void setVolume(float f)
setVolume
in interface de.lessvoid.nifty.spi.sound.SoundHandle
public float getVolume()
getVolume
in interface de.lessvoid.nifty.spi.sound.SoundHandle
public boolean isPlaying()
isPlaying
in interface de.lessvoid.nifty.spi.sound.SoundHandle
public void dispose()
dispose
in interface de.lessvoid.nifty.spi.sound.SoundHandle