org.xith3d.loaders.sound.impl.wav
Class WaveSoundContainer

java.lang.Object
  extended by org.xith3d.loaders.sound.impl.wav.WaveSoundContainer
All Implemented Interfaces:
SoundContainer

public class WaveSoundContainer
extends java.lang.Object
implements SoundContainer

SoundContainer implementation for Wave sounds.


Method Summary
 SoundBuffer getData(SoundDriver driver)
          Gets a buffer to be played.
 boolean isStreaming()
          
 void returnData(SoundDriver driver, SoundBuffer buffer)
          Called by the sound system to indicate that it has finished playing the buffer.
 void rewind(SoundDriver driver)
          Generally only valid for streaming sound containers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isStreaming

public boolean isStreaming()

Specified by:
isStreaming in interface SoundContainer
Returns:
if there might be more than one sound buffer available.

getData

public SoundBuffer getData(SoundDriver driver)
Gets a buffer to be played.

Specified by:
getData in interface SoundContainer
Returns:
The buffer ready to be played. Null indicates there is no more data to be played.

returnData

public void returnData(SoundDriver driver,
                       SoundBuffer buffer)
Called by the sound system to indicate that it has finished playing the buffer. In a streaming implementation this is an opportunity to decode the next chunk into this released buffer.

Specified by:
returnData in interface SoundContainer

rewind

public void rewind(SoundDriver driver)
Generally only valid for streaming sound containers. Sets up for a call to the getData() method. The next call to getData() should return the first buffer in the sound source.

Specified by:
rewind in interface SoundContainer