org.xith3d.sound
Class SoundProcessor

java.lang.Object
  extended by org.xith3d.sound.SoundProcessor

public class SoundProcessor
extends java.lang.Object

A SoundProcessor is responsible for processing Sound Nodes in relation to a View.

Most parts are taken from other classes originally coded by David Yazel.


Field Summary
protected  org.openmali.vecmath2.Point3f listenerPosition
           
 
Constructor Summary
SoundProcessor()
          Creates a new SoundProcessor.
 
Method Summary
 void addSound(Sound sound)
          Adds a Sound to the SoundProcessor.
 void clearSoundList()
          Removes all stored Sound Nodes from the list.
 SoundDriver getSoundDriver()
           
 void process(Sound sound, View view)
          Processes a Sound Node to let it play.
 void processAll(View view, long frameId)
          Process all Sound Nodes, that have been collected from the scenegraph.
 void processAll(View view, long frameId, boolean force)
          Process all Sound Nodes, that have been collected from the scenegraph.
 boolean removeSound(Sound sound)
          Removes a Sound Node from the SoundProcessor.
 void setSoundDriver(SoundDriver soundDriver)
          Sets the SoundDriver to be used by this SoundProcessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerPosition

protected org.openmali.vecmath2.Point3f listenerPosition
Constructor Detail

SoundProcessor

public SoundProcessor()
Creates a new SoundProcessor.

Method Detail

setSoundDriver

public void setSoundDriver(SoundDriver soundDriver)
Sets the SoundDriver to be used by this SoundProcessor.

Parameters:
soundDriver -

getSoundDriver

public SoundDriver getSoundDriver()
Returns:
the used SsoundDriver

addSound

public void addSound(Sound sound)
Adds a Sound to the SoundProcessor.

Parameters:
sound - the Sound Node to be added

removeSound

public boolean removeSound(Sound sound)
Removes a Sound Node from the SoundProcessor.

Parameters:
sound - the Sound Node to be removed
Returns:
true, if the Sound was presend before removing

clearSoundList

public void clearSoundList()
Removes all stored Sound Nodes from the list.


process

public void process(Sound sound,
                    View view)
Processes a Sound Node to let it play.

Parameters:
sound - the Sound Node to be processed

processAll

public void processAll(View view,
                       long frameId,
                       boolean force)
Process all Sound Nodes, that have been collected from the scenegraph.


processAll

public void processAll(View view,
                       long frameId)
Process all Sound Nodes, that have been collected from the scenegraph.