direct.showbase.Audio3DManager
from direct.showbase.Audio3DManager import Audio3DManager
Contains the Audio3DManager class.
Inheritance diagram
- class Audio3DManager(audio_manager, listener_target=None, root=None, taskPriority=51)[source]
Bases:
object
- attachListener(self, object)[source]
Sounds will be heard relative to this object. Should probably be the camera.
- attachSoundToObject(self, sound, object)[source]
Sound will come from the location of the object it is attached to. If the object is deleted, the sound will automatically be removed.
- getDistanceFactor(self)[source]
Control the scale that sets the distance units for 3D spacialized audio. Default is 1.0 which is adjust in panda to be meters.
- getDopplerFactor(self)[source]
Control the presence of the Doppler effect. Default is 1.0 Exaggerated Doppler, use >1.0 Diminshed Doppler, use <1.0
- getDropOffFactor(self)[source]
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
- getSoundMaxDistance(self, sound)[source]
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(self, sound)[source]
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)
- setDistanceFactor(self, factor)[source]
Control the scale that sets the distance units for 3D spacialized audio. Default is 1.0 which is adjust in panda to be meters. When you change this, don’t forget that this effects the scale of setSoundMinDistance
- setDopplerFactor(self, factor)[source]
Control the presence of the Doppler effect. Default is 1.0 Exaggerated Doppler, use >1.0 Diminshed Doppler, use <1.0
- setDropOffFactor(self, factor)[source]
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(self, velocity)[source]
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(self)[source]
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(self, sound, dist)[source]
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(self, sound, dist)[source]
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(self, sound, velocity)[source]
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)