j3d.org Aviatrix3D

org.j3d.aviatrix3d.pipeline
Class DefaultAudioPipeline

java.lang.Object
  extended byorg.j3d.aviatrix3d.pipeline.DefaultAudioPipeline
All Implemented Interfaces:
AudioPipeline

public class DefaultAudioPipeline
extends java.lang.Object
implements AudioPipeline

The default implementation of the audio pipeline usable by most applications.

This implementation is targeted towards single threaded architectures. After setting the stages, the render command will not return until everything is complete.

Version:
$Revision: 1.2 $
Author:
Alan Hudson

Constructor Summary
DefaultAudioPipeline()
          Create an instance of the pipeline with nothing registered.
DefaultAudioPipeline(AudioCullStage cs, AudioSortStage ss)
          Construct a pipeline with the sort and cull stages provided.
 
Method Summary
 void displayOnly()
          Cause the surface to redraw the next frame only, with no processing of the pipeline.
 AudioDevice getAudioDevice()
          Get the currently registered drawable device instance.
 void render()
          Start the pipeline functioning now.
 void setAudioDevice(AudioDevice device)
          Register a drawing surface that this pipeline will send its output to.
 void setCuller(AudioCullStage cs)
          Set the cull instance to be used.
 void setRenderableScene(Scene scene)
          Set the root of the scene graph to be used by this pipeline.
 void setSorter(AudioSortStage ss)
          Set the sorter instance to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAudioPipeline

public DefaultAudioPipeline()
Create an instance of the pipeline with nothing registered.


DefaultAudioPipeline

public DefaultAudioPipeline(AudioCullStage cs,
                            AudioSortStage ss)
Construct a pipeline with the sort and cull stages provided.

Parameters:
ss - The sort stage instance to use
cs - The cull stage instance to use
Method Detail

setAudioDevice

public void setAudioDevice(AudioDevice device)
Register a drawing surface that this pipeline will send its output to. Setting a null value will remove the current drawable surface.

Specified by:
setAudioDevice in interface AudioPipeline
Parameters:
device - The audio output device instance to use or replace

getAudioDevice

public AudioDevice getAudioDevice()
Get the currently registered drawable device instance. If none is set, return null.

Specified by:
getAudioDevice in interface AudioPipeline
Returns:
The currently set surface instance or null

render

public void render()
Start the pipeline functioning now. All steps will be called and this method will not return until all are completed and the surface has swapped.

Specified by:
render in interface AudioPipeline

displayOnly

public void displayOnly()
Cause the surface to redraw the next frame only, with no processing of the pipeline. This is typically an optimisation step when nothing has changed in user land, so there's no processing that needs to be done. Skip the processing and tell the drawable surface to render again what it already has set from the previous frame.

Specified by:
displayOnly in interface AudioPipeline

setRenderableScene

public void setRenderableScene(Scene scene)
Set the root of the scene graph to be used by this pipeline. A value of null will remove the scene from being rendered, causing the pipeline to function as a no-op when rendered.

Specified by:
setRenderableScene in interface AudioPipeline
Parameters:
scene - The scene to be rendered

setSorter

public void setSorter(AudioSortStage ss)
Set the sorter instance to be used. If the instance is null, the current sorter is removed.

Parameters:
ss - The sorter instance to use or null

setCuller

public void setCuller(AudioCullStage cs)
Set the cull instance to be used. If the instance is null, the current culler is removed.

Parameters:
cs - The cull instance to use or null

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org