# Audio3DManager

from direct.showbase.Audio3DManager import Audio3DManager

## Inheritance:

Audio3DManager:

## Methods of Audio3DManager:

__init__
attachListener
attachSoundToObject
detachListener
detachSound
getDistanceFactor
getDopplerFactor
getDropOffFactor
getListenerVelocity
getSoundMaxDistance
getSoundMinDistance
getSoundsOnObject
getSoundVelocity
loadSfx
setDistanceFactor
setDopplerFactor
setDropOffFactor
setListenerVelocity
setListenerVelocityAuto
setSoundMaxDistance
setSoundMinDistance
setSoundVelocity
setSoundVelocityAuto
update

__init__ def __init__(self, audio_manager, listener_target=None, root=None, taskPriority=51) Undocumented function.

attachListener def attachListener(self, object) Sounds will be heard relative to this object. Should probably be the camera.

attachSoundToObject def attachSoundToObject(self, sound, object) Sound will come from the location of the object it is attached to

detachListener def detachListener(self) Sounds will be heard relative to the root, probably render.

detachSound def detachSound(self, sound) sound will no longer have it's 3D position updated

getDistanceFactor def getDistanceFactor(self) Control the scale that sets the distance units for 3D spacialized audio. Default is 1.0 which is adjust in panda to be feet.

getDopplerFactor def getDopplerFactor(self) Control the presence of the Doppler effect. Default is 1.0 Exaggerated Doppler, use >1.0 Diminshed Doppler, use <1.0

getDropOffFactor def getDropOffFactor(self) Exaggerate or diminish the effect of distance on sound. Default is 1.0 Valid range is 0 to 10 Faster drop off, use >1.0 Slower drop off, use <1.0

getListenerVelocity def getListenerVelocity(self) Get the velocity of the listener.

getSoundMaxDistance def getSoundMaxDistance(self, sound) Controls the maximum distance (in units) that this sound stops falling off. The sound does not stop at that point, it just doesn't get any quieter. You should rarely need to adjust this. Default is 1000000000.0

getSoundMinDistance def getSoundMinDistance(self, sound) Controls the distance (in units) that this sound begins to fall off. Also affects the rate it falls off. Default is 3.28 (in feet, this is 1 meter)

getSoundsOnObject def getSoundsOnObject(self, object) returns a list of sounds attached to an object

getSoundVelocity def getSoundVelocity(self, sound) Get the velocity of the sound.

loadSfx def loadSfx(self, name) Use Audio3DManager.loadSfx to load a sound with 3D positioning enabled

setDistanceFactor def setDistanceFactor(self, factor) Control the scale that sets the distance units for 3D spacialized audio. Default is 1.0 which is adjust in panda to be feet. When you change this, don't forget that this effects the scale of setSoundMinDistance

setDopplerFactor def setDopplerFactor(self, factor) Control the presence of the Doppler effect. Default is 1.0 Exaggerated Doppler, use >1.0 Diminshed Doppler, use <1.0

setDropOffFactor def setDropOffFactor(self, factor) Exaggerate or diminish the effect of distance on sound. Default is 1.0 Valid range is 0 to 10 Faster drop off, use >1.0 Slower drop off, use <1.0

setListenerVelocity def setListenerVelocity(self, velocity) Set the velocity vector (in units/sec) of the listener, for calculating doppler shift. This is relative to the sound root (probably render). Default: VBase3(0, 0, 0)

setListenerVelocityAuto def setListenerVelocityAuto(self) If velocity is set to auto, the velocity will be determined by the previous position of the object the listener is attached to and the frame dt. Make sure if you use this method that you remember to clear the previous transformation between frames.

setSoundMaxDistance def setSoundMaxDistance(self, sound, dist) Controls the maximum distance (in units) that this sound stops falling off. The sound does not stop at that point, it just doesn't get any quieter. You should rarely need to adjust this. Default is 1000000000.0

setSoundMinDistance def setSoundMinDistance(self, sound, dist) Controls the distance (in units) that this sound begins to fall off. Also affects the rate it falls off. Default is 3.28 (in feet, this is 1 meter) Don't forget to change this when you change the DistanceFactor

setSoundVelocity def setSoundVelocity(self, sound, velocity) Set the velocity vector (in units/sec) of the sound, for calculating doppler shift. This is relative to the sound root (probably render). Default: VBase3(0, 0, 0)

setSoundVelocityAuto def setSoundVelocityAuto(self, sound) If velocity is set to auto, the velocity will be determined by the previous position of the object the sound is attached to and the frame dt. Make sure if you use this method that you remember to clear the previous transformation between frames.

update def update(self, task=None) Updates position of sounds in the 3D audio system. Will be called automatically in a task.