|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.sound.audio.ClipAudio
public class ClipAudio
Title: ClipAudio
Description: Wrapper for a Clip audio class. Audio for playing sound Clips. The update method is used for ClipAudioFilter classes, since the update(LineEvent) only occurs when the audio stops. The ClipAudio will need to be added to the GameMap's updateable List in order to work.
Copyright: Copyright (c) Nov 19, 2011
Constructor Summary | |
---|---|
ClipAudio(javax.sound.sampled.Clip clip)
|
|
ClipAudio(javax.sound.sampled.Clip clip,
ClipAudioFilter filter)
|
Method Summary | |
---|---|
void |
close()
|
ClipAudio |
copy()
|
double |
getLength()
|
java.lang.String |
getName()
|
void |
pause()
|
void |
play()
|
void |
resume()
|
void |
setAudioListener(AudioListener listener)
|
void |
setClipAudioFilter(ClipAudioFilter clipAudioFilter)
Sets the ClipAudioFilter, and sets it's parent to this class. |
void |
setLength(double length)
|
void |
setName(java.lang.String name)
|
void |
stop()
|
void |
update(javax.sound.sampled.LineEvent lineEvent)
|
void |
update(long elapseTime)
The update method is used for filter updates, when sound does have regular updates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClipAudio(javax.sound.sampled.Clip clip)
public ClipAudio(javax.sound.sampled.Clip clip, ClipAudioFilter filter)
Method Detail |
---|
public void close()
close
in interface Audio
public ClipAudio copy()
copy
in interface Audio
public double getLength()
getLength
in interface Audio
public java.lang.String getName()
getName
in interface Updateable
public void pause()
pause
in interface Audio
public void play()
play
in interface Audio
public void resume()
resume
in interface Audio
public void setLength(double length)
setLength
in interface Audio
public void stop()
stop
in interface Audio
public void setAudioListener(AudioListener listener)
setAudioListener
in interface Audio
public void setClipAudioFilter(ClipAudioFilter clipAudioFilter)
clipAudioFilter
- public void setName(java.lang.String name)
public void update(long elapseTime)
Audio
update
in interface Audio
update
in interface Updateable
elapseTime
- longpublic void update(javax.sound.sampled.LineEvent lineEvent)
update
in interface javax.sound.sampled.LineListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |