org.xith3d.sound
Interface SoundDriver

All Known Implementing Classes:
SoundDriverImpl, SoundDriverImpl

public interface SoundDriver

Implementations of a sound driver must implement this interface. This represents the various capabilities of the sound system.


Method Summary
 SoundBuffer allocateSoundBuffer()
           
 SoundSource allocateSoundSource()
           
 void delete(SoundBuffer buffer)
           
 void delete(SoundSource source)
           
 float getDopplerFactor()
           
 float getDopplerVelocity()
           
 float getListenerVolume()
           
 int getNumAvailableSources()
           
 int getNumSources()
           
 boolean isOnline()
           
 void newFrameAsync()
          Call this method once a frame to check and possibly load the next buffer from all the streaming sources, as well as dequeue all processed buffers.
 void newFrameSync()
          Call this method once a frame to check and possibly load the next buffer from all the streaming sources, as well as dequeue all processed buffers.
 void setDopplerFactor(float factor)
           
 void setDopplerVelocity(float velocity)
           
 void setListenerOrientation(org.openmali.vecmath2.Tuple3f direction, org.openmali.vecmath2.Tuple3f up)
           
 void setListenerPosition(org.openmali.vecmath2.Tuple3f position)
           
 void setListenerVelocity(org.openmali.vecmath2.Tuple3f velocity)
           
 void setListenerVolume(float gain)
           
 void shutdown()
           
 

Method Detail

newFrameSync

void newFrameSync()
Call this method once a frame to check and possibly load the next buffer from all the streaming sources, as well as dequeue all processed buffers. This will operate synchronously, so it will not return until the work is complete.


newFrameAsync

void newFrameAsync()
Call this method once a frame to check and possibly load the next buffer from all the streaming sources, as well as dequeue all processed buffers. This will operate asynchronously and will return immediately. If it is already processing from the last frame then it will skip this frame. The thread used is a high priority thread so that it can complete its task in as little time as possible while still reducing frame stutter. This is because this is mostly I/O bound and will enter wait states, thus freeing CPU for rendering.


setListenerVelocity

void setListenerVelocity(org.openmali.vecmath2.Tuple3f velocity)

setListenerPosition

void setListenerPosition(org.openmali.vecmath2.Tuple3f position)

setListenerOrientation

void setListenerOrientation(org.openmali.vecmath2.Tuple3f direction,
                            org.openmali.vecmath2.Tuple3f up)

setListenerVolume

void setListenerVolume(float gain)

getListenerVolume

float getListenerVolume()

setDopplerVelocity

void setDopplerVelocity(float velocity)

getDopplerVelocity

float getDopplerVelocity()

setDopplerFactor

void setDopplerFactor(float factor)

getDopplerFactor

float getDopplerFactor()

allocateSoundSource

SoundSource allocateSoundSource()
                                throws SoundException
Throws:
SoundException

allocateSoundBuffer

SoundBuffer allocateSoundBuffer()

delete

void delete(SoundSource source)

delete

void delete(SoundBuffer buffer)

getNumAvailableSources

int getNumAvailableSources()

getNumSources

int getNumSources()

shutdown

void shutdown()

isOnline

boolean isOnline()