GTGE API

com.golden.gamedev.engine.audio
Class WaveRenderer

java.lang.Object
  extended by com.golden.gamedev.engine.BaseAudioRenderer
      extended by com.golden.gamedev.engine.audio.WaveRenderer
All Implemented Interfaces:
EventListener, LineListener

public class WaveRenderer
extends BaseAudioRenderer
implements LineListener

Play wave sound (*.wav, *.au).


Field Summary
 
Fields inherited from class com.golden.gamedev.engine.BaseAudioRenderer
END_OF_SOUND, ERROR, PLAYING, status, STOPPED, volume
 
Constructor Summary
WaveRenderer()
          Creates new wave audio renderer.
 
Method Summary
 boolean isAvailable()
          Returns true, if this audio renderer is available to use or false if this renderer is not available to use (failed to initialized).
 boolean isVolumeSupported()
          Returns whether setting audio volume is supported or not.
protected  void playSound(URL audiofile)
          Plays sound with specified audio file.
protected  void replaySound(URL audiofile)
          Replays last played sound.
protected  void setSoundVolume(float volume)
          Sets audio sound volume.
protected  void stopSound()
          Stops any playing sound.
 void update(LineEvent e)
          Notified when the sound is stopped externally.
 
Methods inherited from class com.golden.gamedev.engine.BaseAudioRenderer
getAudioFile, getStatus, getVolume, isLoop, play, play, setLoop, setVolume, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaveRenderer

public WaveRenderer()
Creates new wave audio renderer.

Method Detail

isAvailable

public boolean isAvailable()
Description copied from class: BaseAudioRenderer
Returns true, if this audio renderer is available to use or false if this renderer is not available to use (failed to initialized).

Specified by:
isAvailable in class BaseAudioRenderer

playSound

protected void playSound(URL audiofile)
Description copied from class: BaseAudioRenderer
Plays sound with specified audio file.

Specified by:
playSound in class BaseAudioRenderer

replaySound

protected void replaySound(URL audiofile)
Description copied from class: BaseAudioRenderer
Replays last played sound.

Specified by:
replaySound in class BaseAudioRenderer

stopSound

protected void stopSound()
Description copied from class: BaseAudioRenderer
Stops any playing sound.

Specified by:
stopSound in class BaseAudioRenderer

update

public void update(LineEvent e)
Notified when the sound is stopped externally.

Specified by:
update in interface LineListener

setSoundVolume

protected void setSoundVolume(float volume)
Description copied from class: BaseAudioRenderer
Sets audio sound volume.

Overrides:
setSoundVolume in class BaseAudioRenderer

isVolumeSupported

public boolean isVolumeSupported()
Description copied from class: BaseAudioRenderer
Returns whether setting audio volume is supported or not.

Overrides:
isVolumeSupported in class BaseAudioRenderer

GTGE API

Copyright © 2003-2005 Golden T Studios. All rights reserved. Use is subject to license terms.
GoldenStudios.or.id