j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface AudioDevice

All Known Implementing Classes:
OpenALAudioDevice

public interface AudioDevice

Interface representing the output of an audio pipeline..

Conceptually an AudioDevice might run all speakers or just part of the total soundscape.

Version:
$Revision: 1.2 $
Author:
Alan Hudson

Method Summary
 void dispose()
          Instruct this surface that you have finished with the resources needed and to dispose all rendering resources.
 void draw()
          Instruct the surface to draw the collected set of nodes now.
 java.lang.Object getSurfaceObject()
          Get the underlying object that this surface is rendered to.
 void queueDeletedObject(DeletableSceneGraphObject obj)
          An object has been detected as being deleted (no internal or external references to it left) and it needs to be cleaned up.
 void setDrawableObjects(AudioInstructions commands)
          Update the list of items to be rendered to the current list.
 void setRenderControlThread(java.lang.Thread th)
          Tell the surface to use the given thread as the rendering control thread.
 

Method Detail

setRenderControlThread

public void setRenderControlThread(java.lang.Thread th)
Tell the surface to use the given thread as the rendering control thread. Used when you want to clock the renderer to the rest of the pipeline, rather than letting it sit in it's own loop. Due to bugs in JOGL, we have to start the internal rendering threads after the containing window has become visible. See JOGL issue #54 for more details on this bug.

Parameters:
th - The render control thread instance to use or null

queueDeletedObject

public void queueDeletedObject(DeletableSceneGraphObject obj)
An object has been detected as being deleted (no internal or external references to it left) and it needs to be cleaned up. The next oppourtunity this drawable and any sub-drawables get, this object should have it's cleanup() method called and then the reference to it should be discarded.

Parameters:
obj - The instance of the object to queue for deletion

setDrawableObjects

public void setDrawableObjects(AudioInstructions commands)
Update the list of items to be rendered to the current list. Draw them at the next oppourtunity.

Parameters:
commands - The list of drawable surfaces to render

draw

public void draw()
Instruct the surface to draw the collected set of nodes now. The registered view environment is used to draw to this surface. If no view is registered, the surface is cleared and then this call is exited. The drawing surface does not swap the buffers at this point.


getSurfaceObject

public java.lang.Object getSurfaceObject()
Get the underlying object that this surface is rendered to. If it is a screen display device, the surface can be one of AWT Component or Swing JComponent. An off-screen buffer would be a form of AWT Image etc.

Returns:
The drawable surface representation

dispose

public void dispose()
Instruct this surface that you have finished with the resources needed and to dispose all rendering resources.


j3d.org Aviatrix3D

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