sdl.test
Class TestAudio

java.lang.Object
  |
  +--sdl.test.TestAudio
All Implemented Interfaces:
sdl.audio.AudioCallBack, sdl.event.EventListener

public class TestAudio
extends java.lang.Object
implements sdl.event.EventListener, sdl.audio.AudioCallBack

Plays different sounds based on Keyboard events. Uses keys "a,s,d,f,g,h,j". This demo expects certain WAV files in $JSDL_HOME/C.

Change the WAV_DIR variable to point to your path.


Constructor Summary
TestAudio()
           
 
Method Summary
 void addAudioPlay(sdl.audio.AudioPlay play1)
           
 void feedMe(int handle, int length, sdl.audio.SDLAudio obj)
           
 boolean incomingEvents(sdl.event.SDLCustomEvent event)
           
static void main(java.lang.String[] args)
           
 boolean playSound(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestAudio

public TestAudio()
Method Detail

addAudioPlay

public void addAudioPlay(sdl.audio.AudioPlay play1)

feedMe

public void feedMe(int handle,
                   int length,
                   sdl.audio.SDLAudio obj)
Specified by:
feedMe in interface sdl.audio.AudioCallBack

playSound

public boolean playSound(java.lang.String name)

incomingEvents

public boolean incomingEvents(sdl.event.SDLCustomEvent event)
                       throws sdl.event.SDLEventException
Specified by:
incomingEvents in interface sdl.event.EventListener
sdl.event.SDLEventException

main

public static void main(java.lang.String[] args)