com.sun.j3d.audioengines
Class AudioEngine

java.lang.Object
  |
  +--com.sun.j3d.audioengines.AudioEngine
Direct Known Subclasses:
AudioEngine3D

public class AudioEngine
extends java.lang.Object
implements AudioDevice

A AudioEngine object encapsulates the AudioDevice's basic information.


Fields inherited from interface javax.media.j3d.AudioDevice
HEADPHONES, MONO_SPEAKER, STEREO_SPEAKERS
 
Constructor Summary
AudioEngine(PhysicalEnvironment physicalEnvironment)
          Construct a new AudioEngine with the specified P.E.
 
Method Summary
 boolean close()
          Code to close the device
 float getAngleOffsetToSpeaker()
          Get Angle Offset To Speaker
 int getAudioPlaybackType()
          Get Type of Audio Playback Output Device
 float getCenterEarToSpeaker()
          Get Distance from Ear to Speaker
 int getChannelsAvailable()
          Query number of channels currently available for use by the
 int getChannelsUsedForSound(Sound sound)
          Deprecated. This method is now part of the Sound class
 int getTotalChannels()
          Query total number of channels available for sound rendering for this audio device.
 boolean initialize()
          Code to initialize the device
 void setAngleOffsetToSpeaker(float angle)
          Set Angle Offset To Speaker
 void setAudioPlaybackType(int type)
          Set Type of Audio Playback physical transducer(s) sound is output to.
 void setCenterEarToSpeaker(float distance)
          Set Distance from the Center Ear to a Speaker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioEngine

public AudioEngine(PhysicalEnvironment physicalEnvironment)
Construct a new AudioEngine with the specified P.E.
Parameters:
physicalEnvironment - the physical environment object where we want access to this device.
Method Detail

initialize

public boolean initialize()
Code to initialize the device
Specified by:
initialize in interface AudioDevice
Returns:
flag: true is initialized sucessfully, false if error

close

public boolean close()
Code to close the device
Specified by:
close in interface AudioDevice
Returns:
flag: true is closed sucessfully, false if error

setAudioPlaybackType

public void setAudioPlaybackType(int type)
Set Type of Audio Playback physical transducer(s) sound is output to. Valid types are HEADPHONE, MONO_SPEAKER, STEREO_SPEAKERS
Specified by:
setAudioPlaybackType in interface AudioDevice
Parameters:
type - of audio output device

getAudioPlaybackType

public int getAudioPlaybackType()
Get Type of Audio Playback Output Device
Specified by:
getAudioPlaybackType in interface AudioDevice
Tags copied from interface: AudioDevice
Returns:
audio playback type

setCenterEarToSpeaker

public void setCenterEarToSpeaker(float distance)
Set Distance from the Center Ear to a Speaker
Specified by:
setCenterEarToSpeaker in interface AudioDevice
Parameters:
distance - from the center ear and to the speaker

getCenterEarToSpeaker

public float getCenterEarToSpeaker()
Get Distance from Ear to Speaker
Specified by:
getCenterEarToSpeaker in interface AudioDevice
Tags copied from interface: AudioDevice
Returns:
distance from interaural midpoint between the ears to closest speaker

setAngleOffsetToSpeaker

public void setAngleOffsetToSpeaker(float angle)
Set Angle Offset To Speaker
Specified by:
setAngleOffsetToSpeaker in interface AudioDevice
Parameters:
angle - in radian between head coordinate Z axis and vector to speaker

getAngleOffsetToSpeaker

public float getAngleOffsetToSpeaker()
Get Angle Offset To Speaker
Specified by:
getAngleOffsetToSpeaker in interface AudioDevice
Tags copied from interface: AudioDevice
Returns:
angle in radians from head Z axis and vector from center ear to speaker

getTotalChannels

public int getTotalChannels()
Query total number of channels available for sound rendering for this audio device.
Specified by:
getTotalChannels in interface AudioDevice
Tags copied from interface: AudioDevice
Returns:
total number of channels that can be used for this audio device

getChannelsAvailable

public int getChannelsAvailable()
Query number of channels currently available for use by the
Specified by:
getChannelsAvailable in interface AudioDevice
Tags copied from interface: AudioDevice
Returns:
total number of channels current available

getChannelsUsedForSound

public int getChannelsUsedForSound(Sound sound)
Deprecated. This method is now part of the Sound class

Query number of channels that would be used to render a particular sound node.
Specified by:
getChannelsUsedForSound in interface AudioDevice
Parameters:
sound - refenence to sound node that query to be performed on