org.deken.game.sound
Interface Sound

All Superinterfaces:
Updateable
All Known Implementing Classes:
BaseSound, LoopedSound, RandomSound, SingleSound, TimeListeningSound

public interface Sound
extends Updateable

Title: Sound

Description: TODO

Copyright: Copyright (c)Dec 18, 2011 Gary Deken

Version:
1.0
Author:
Gary Deken

Method Summary
 void addAudio(Audio audio)
           
 void addSoundListener(SoundListener soundListener)
          Add a SoundListener to this sound.
 Sound copy()
          Copies the sound.
 java.lang.String getName()
          Name of the sound object.
 boolean isPlaying()
           
 void pause()
          Pauses the sound object at it's current location.
 void play()
          Plays the sound object, with an option to loop the sound.
 void resume()
          Resumes the sound object from where it was paused.
 void stop()
          Stops the sound object.
 void update(long elapseTime)
          The update method is used for filter updates, when sound does have regular updates.
 

Method Detail

addAudio

void addAudio(Audio audio)
Parameters:
audio -

addSoundListener

void addSoundListener(SoundListener soundListener)
Add a SoundListener to this sound.

Parameters:
soundListener -

copy

Sound copy()
Copies the sound.

Returns:
Sound

pause

void pause()
Pauses the sound object at it's current location.


play

void play()
Plays the sound object, with an option to loop the sound.


resume

void resume()
Resumes the sound object from where it was paused.


stop

void stop()
Stops the sound object.


update

void update(long elapseTime)
The update method is used for filter updates, when sound does have regular updates. Such as Clip audio.

Specified by:
update in interface Updateable
Parameters:
elapseTime -

getName

java.lang.String getName()
Name of the sound object.

Specified by:
getName in interface Updateable
Returns:
String name.

isPlaying

boolean isPlaying()
Returns:
if this sound object is play the sound or not.