|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.cinematic.events.AbstractCinematicEvent
com.jme3.cinematic.events.SoundTrack
public class SoundTrack
A sound track to be played in a cinematic.
Field Summary | |
---|---|
protected AudioNode |
audioNode
|
protected java.lang.String |
path
|
protected boolean |
stream
|
Fields inherited from class com.jme3.cinematic.events.AbstractCinematicEvent |
---|
initialDuration, listeners, loopMode, playState, resuming, speed, time |
Constructor Summary | |
---|---|
SoundTrack()
|
|
SoundTrack(java.lang.String path)
creates a sound track from the given resource path |
|
SoundTrack(java.lang.String path,
boolean stream)
creates a sound track from the given resource path |
|
SoundTrack(java.lang.String path,
boolean stream,
float initialDuration)
|
|
SoundTrack(java.lang.String path,
boolean stream,
float initialDuration,
LoopMode loopMode)
|
|
SoundTrack(java.lang.String path,
boolean stream,
LoopMode loopMode)
|
|
SoundTrack(java.lang.String path,
float initialDuration)
|
|
SoundTrack(java.lang.String path,
float initialDuration,
LoopMode loopMode)
|
|
SoundTrack(java.lang.String path,
LoopMode loopMode)
|
Method Summary | |
---|---|
AudioNode |
getAudioNode()
Returns the underlying audion node of this sound track |
void |
initEvent(Application app,
Cinematic cinematic)
initialize this event (should be called internally only) |
void |
onPause()
place here the code you want to execute when the event is paused |
void |
onPlay()
Place here the code you want to execute when the event is started |
void |
onStop()
Place here the code you want to execute when the event is stoped. |
void |
onUpdate(float tpf)
Place here the code you want to execute on update (only called when the event is playing) |
void |
read(JmeImporter im)
for serialization only |
void |
setLoopMode(LoopMode loopMode)
Sets the loopMode of the animation |
void |
setTime(float time)
When this method is invoked, the event should fast forward to the given time according tim 0 is the start of the event. |
void |
write(JmeExporter ex)
for serialization only |
Methods inherited from class com.jme3.cinematic.events.AbstractCinematicEvent |
---|
addListener, getDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, getTime, internalUpdate, pause, play, removeListener, setInitialDuration, setSpeed, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String path
protected AudioNode audioNode
protected boolean stream
Constructor Detail |
---|
public SoundTrack(java.lang.String path)
path
- the path to an audi file (ie : "Sounds/mySound.wav")public SoundTrack(java.lang.String path, boolean stream)
path
- the path to an audi file (ie : "Sounds/mySound.wav")stream
- true to make the audio data streamedpublic SoundTrack(java.lang.String path, boolean stream, float initialDuration)
public SoundTrack(java.lang.String path, boolean stream, LoopMode loopMode)
public SoundTrack(java.lang.String path, boolean stream, float initialDuration, LoopMode loopMode)
public SoundTrack(java.lang.String path, float initialDuration)
public SoundTrack(java.lang.String path, LoopMode loopMode)
public SoundTrack(java.lang.String path, float initialDuration, LoopMode loopMode)
public SoundTrack()
Method Detail |
---|
public void initEvent(Application app, Cinematic cinematic)
AbstractCinematicEvent
initEvent
in interface CinematicEvent
initEvent
in class AbstractCinematicEvent
app
- the applicationcinematic
- the cinematicpublic void setTime(float time)
AbstractCinematicEvent
setTime
in interface CinematicEvent
setTime
in class AbstractCinematicEvent
time
- the time to fast forward topublic void onPlay()
AbstractCinematicEvent
onPlay
in class AbstractCinematicEvent
public void onStop()
AbstractCinematicEvent
onStop
in class AbstractCinematicEvent
public void onPause()
AbstractCinematicEvent
onPause
in class AbstractCinematicEvent
public void onUpdate(float tpf)
AbstractCinematicEvent
onUpdate
in class AbstractCinematicEvent
tpf
- time per framepublic AudioNode getAudioNode()
public void setLoopMode(LoopMode loopMode)
AbstractCinematicEvent
setLoopMode
in interface CinematicEvent
setLoopMode
in class AbstractCinematicEvent
loopMode
- Set the loop mode for the channel. The loop mode
determines what will happen to the animation once it finishes
playing.
For more information, see the LoopMode enum class.LoopMode
public void write(JmeExporter ex) throws java.io.IOException
AbstractCinematicEvent
write
in interface Savable
write
in class AbstractCinematicEvent
ex
- exporter
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
AbstractCinematicEvent
read
in interface Savable
read
in class AbstractCinematicEvent
im
- importer
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |