public abstract class AudioEngine extends Object implements AudioDevice
NOTE: AudioEngine developers should not subclass this class directly. Subclass AudioEngine3DL2 instead.
HEADPHONES, MONO_SPEAKER, STEREO_SPEAKERS
Constructor and Description |
---|
AudioEngine(PhysicalEnvironment physicalEnvironment)
Construct a new AudioEngine with the specified P.E.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
close()
Code to close the device
|
float |
getAngleOffsetToSpeaker()
Get Angle Offset To Speaker
returns value set as angle between vector to speaker and Z head axis
|
int |
getAudioPlaybackType()
Get Type of Audio Playback Output Device
returns audio playback type to which sound is currently output
|
float |
getCenterEarToSpeaker()
Get Distance from Ear to Speaker
returns value set as distance from listener's ear to speaker
|
int |
getChannelsAvailable()
Query number of channels currently available for use by the
returns number of sound channels currently available (number
not being used by active sounds.
|
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.
|
abstract 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
|
public AudioEngine(PhysicalEnvironment physicalEnvironment)
physicalEnvironment
- the physical environment object where we
want access to this device.public abstract boolean initialize()
initialize
in interface AudioDevice
public abstract boolean close()
close
in interface AudioDevice
public void setAudioPlaybackType(int type)
setAudioPlaybackType
in interface AudioDevice
type
- of audio output devicepublic int getAudioPlaybackType()
getAudioPlaybackType
in interface AudioDevice
public void setCenterEarToSpeaker(float distance)
setCenterEarToSpeaker
in interface AudioDevice
distance
- from the center ear and to the speakerpublic float getCenterEarToSpeaker()
getCenterEarToSpeaker
in interface AudioDevice
public void setAngleOffsetToSpeaker(float angle)
setAngleOffsetToSpeaker
in interface AudioDevice
angle
- in radian between head coordinate Z axis and vector to speakerpublic float getAngleOffsetToSpeaker()
getAngleOffsetToSpeaker
in interface AudioDevice
public int getTotalChannels()
getTotalChannels
in interface AudioDevice
public int getChannelsAvailable()
getChannelsAvailable
in interface AudioDevice
public int getChannelsUsedForSound(Sound sound)
getChannelsUsedForSound
in interface AudioDevice
sound
- refenence to sound node that query to be performed on
returns number of sound channels used by a specific Sound nodeCopyright © 2016–2022 SciJava. All rights reserved.