org.deken.game.sound.audio
Class StreamAudio

java.lang.Object
  extended by org.deken.game.sound.audio.StreamAudio
All Implemented Interfaces:
Audio, Updateable

public class StreamAudio
extends java.lang.Object
implements Audio

Title: StreamAudio

Description: TODO

Copyright: Copyright (c) Feb 12, 2012

Version:
1.0
Author:
Gary Deken

Constructor Summary
StreamAudio(byte[] samples, javax.sound.sampled.AudioFormat format)
           
StreamAudio(byte[] samples, javax.sound.sampled.AudioFormat format, StreamAudioFilter audioFilter)
           
 
Method Summary
 void close()
           
 Audio copy()
           
 double getLength()
           
 java.lang.String getName()
           
 void pause()
           
 void play()
           
 void resume()
           
 void setAudioListener(AudioListener listener)
           
 void setLength(double length)
           
 void setName(java.lang.String name)
           
 void stop()
           
 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

StreamAudio

public StreamAudio(byte[] samples,
                   javax.sound.sampled.AudioFormat format)

StreamAudio

public StreamAudio(byte[] samples,
                   javax.sound.sampled.AudioFormat format,
                   StreamAudioFilter audioFilter)
Method Detail

close

public void close()
Specified by:
close in interface Audio

copy

public Audio copy()
Specified by:
copy in interface Audio

getLength

public double getLength()
Specified by:
getLength in interface Audio

getName

public java.lang.String getName()
Specified by:
getName in interface Updateable
Returns:

pause

public void pause()
Specified by:
pause in interface Audio

play

public void play()
Specified by:
play in interface Audio

resume

public void resume()
Specified by:
resume in interface Audio

setAudioListener

public void setAudioListener(AudioListener listener)
Specified by:
setAudioListener in interface Audio

setLength

public void setLength(double length)
Specified by:
setLength in interface Audio

setName

public void setName(java.lang.String name)

stop

public void stop()
Specified by:
stop in interface Audio

update

public 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 Audio
Specified by:
update in interface Updateable
Parameters:
elapseTime -