org.deken.game.sound
Class RandomSound

java.lang.Object
  extended by org.deken.game.sound.BaseSound
      extended by org.deken.game.sound.RandomSound
All Implemented Interfaces:
AudioListener, Sound, Updateable

public class RandomSound
extends BaseSound

Title: SoundRandomClips

Description: Plays a random clip for the giving list of clips.

Copyright: Copyright (c) Nov 6, 2011

Version:
1.0
Author:
Gary Deken

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deken.game.sound.BaseSound
BaseSound.SEQUENCE
 
Field Summary
 
Fields inherited from class org.deken.game.sound.BaseSound
audio, listeners, name, playing
 
Constructor Summary
RandomSound(Audio audio, java.lang.String name)
           
RandomSound(Audio audio, java.lang.String name, boolean continuous)
           
RandomSound(java.lang.String name, java.util.List<Audio> audios)
           
RandomSound(java.lang.String name, java.util.List<Audio> audios, boolean continuous)
           
 
Method Summary
 void addAudio(Audio audio)
          Add an additional clip to this sound.
 void audioStop()
           
 RandomSound copy()
          Copies the sound.
 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 setContinuous(boolean continuous)
           
 void stop()
          Stops the sound object.
 
Methods inherited from class org.deken.game.sound.BaseSound
addSoundListener, copyParent, getName, isPlaying, notifyListeners, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSound

public RandomSound(Audio audio,
                   java.lang.String name)

RandomSound

public RandomSound(Audio audio,
                   java.lang.String name,
                   boolean continuous)

RandomSound

public RandomSound(java.lang.String name,
                   java.util.List<Audio> audios)

RandomSound

public RandomSound(java.lang.String name,
                   java.util.List<Audio> audios,
                   boolean continuous)
Method Detail

play

public void play()
Description copied from interface: Sound
Plays the sound object, with an option to loop the sound.


stop

public void stop()
Description copied from interface: Sound
Stops the sound object.


pause

public void pause()
Description copied from interface: Sound
Pauses the sound object at it's current location.


resume

public void resume()
Description copied from interface: Sound
Resumes the sound object from where it was paused.


audioStop

public void audioStop()

setContinuous

public void setContinuous(boolean continuous)

addAudio

public void addAudio(Audio audio)
Add an additional clip to this sound.

Specified by:
addAudio in interface Sound
Overrides:
addAudio in class BaseSound
Parameters:
audio -

copy

public RandomSound copy()
Description copied from interface: Sound
Copies the sound.

Returns:
Sound