j3d.org Aviatrix3D

org.j3d.aviatrix3d.audio
Class OpenALAudioDevice

java.lang.Object
  extended byorg.j3d.aviatrix3d.audio.OpenALAudioDevice
All Implemented Interfaces:
AudioDevice

public class OpenALAudioDevice
extends java.lang.Object
implements AudioDevice

Implementation of the most basic audio device, supporting the minimal number of features using OpenAL.

Version:
$Revision: 1.3 $
Author:
Alan Hudson

Constructor Summary
OpenALAudioDevice()
          Construct a surface that requires the given set of capabilities.
 
Method Summary
 void checkForExtension(java.lang.String glExtensionString)
          Add an extension string to check for at startup.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenALAudioDevice

public OpenALAudioDevice()
Construct a surface that requires the given set of capabilities.

Method Detail

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.

Specified by:
queueDeletedObject in interface AudioDevice
Parameters:
obj - The instance to queue

setDrawableObjects

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

Specified by:
setDrawableObjects in interface AudioDevice
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.

Specified by:
draw in interface AudioDevice

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.

Specified by:
getSurfaceObject in interface AudioDevice
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.

Specified by:
dispose in interface AudioDevice

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.

Specified by:
setRenderControlThread in interface AudioDevice
Parameters:
th - The render control thread instance to use or null

checkForExtension

public void checkForExtension(java.lang.String glExtensionString)
Add an extension string to check for at startup.

Parameters:
glExtensionString - String to check for being valid

j3d.org Aviatrix3D

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