org.xith3d.loaders.sound.impl.ogg
Class OggSoundContainer

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

public class OggSoundContainer
extends java.lang.Object
implements SoundContainer

Insert type comment here.


Method Summary
 SoundBuffer getData(SoundDriver driver)
          Gets a buffer to be played.
 long getDecodedSize()
          Can only be called after you get the data.
 int getFreq()
           
 int getNumChannels()
           
 boolean isStreaming()
          Currently always returns false, because streaming is not supported.
 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.
 void setVolumeMultiplier(float v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNumChannels

public int getNumChannels()

setVolumeMultiplier

public void setVolumeMultiplier(float v)

getFreq

public int getFreq()

getDecodedSize

public long getDecodedSize()
Can only be called after you get the data. Otherwise it will just return zero.

Returns:
The decoded size of the sound stream.

isStreaming

public boolean isStreaming()
Currently always returns false, because streaming is not supported.

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