AudioManager
from panda3d.core import AudioManager
- class AudioManager
Bases:
TypedReferenceCount
Inheritance diagram
- SMHeuristic = 0
- SMSample = 1
- SMStream = 2
- SM_heuristic = 0
- SM_sample = 1
- SM_stream = 2
- SPEAKERMODE5point1 = 5
- SPEAKERMODE7point1 = 6
- SPEAKERMODECOUNT = 8
- SPEAKERMODEMax = 7
- SPEAKERMODEMono = 1
- SPEAKERMODEQuad = 3
- SPEAKERMODERaw = 0
- SPEAKERMODEStereo = 2
- SPEAKERMODESurround = 4
- SPEAKERMODE_5point1 = 5
- SPEAKERMODE_7point1 = 6
- SPEAKERMODE_COUNT = 8
- SPEAKERMODE_max = 7
- SPEAKERMODE_mono = 1
- SPEAKERMODE_quad = 3
- SPEAKERMODE_raw = 0
- SPEAKERMODE_stereo = 2
- SPEAKERMODE_surround = 4
- SPKBackleft = 5
- SPKBackright = 6
- SPKCOUNT = 9
- SPKCenter = 3
- SPKFrontleft = 1
- SPKFrontright = 2
- SPKNone = 0
- SPKSideleft = 7
- SPKSideright = 8
- SPKSub = 4
- SPK_COUNT = 9
- SPK_backleft = 5
- SPK_backright = 6
- SPK_center = 3
- SPK_frontleft = 1
- SPK_frontright = 2
- SPK_none = 0
- SPK_sideleft = 7
- SPK_sideright = 8
- SPK_sub = 4
- __init__(*args, **kwargs)
- audio3dGetDistanceFactor()
C++ Interface: audio_3d_get_distance_factor(AudioManager self)
- audio3dGetDopplerFactor()
C++ Interface: audio_3d_get_doppler_factor(AudioManager self)
- audio3dGetDropOffFactor()
C++ Interface: audio_3d_get_drop_off_factor(AudioManager self)
- audio3dSetDistanceFactor()
C++ Interface: audio_3d_set_distance_factor(const AudioManager self, float factor)
// Control the “relative scale that sets the distance factor” units for 3D // spacialized audio. This is a float in units-per-meter. Default value is // 1.0, which means that Panda units are understood as meters; for e.g. // feet, set 3.28. This factor is applied only to Fmod and OpenAL at the // moment.
- audio3dSetDopplerFactor()
C++ Interface: audio_3d_set_doppler_factor(const AudioManager self, float factor)
// Control the presence of the Doppler effect. Default is 1.0 Exaggerated // Doppler, use >1.0 Diminshed Doppler, use <1.0
- audio3dSetDropOffFactor()
C++ Interface: audio_3d_set_drop_off_factor(const AudioManager self, float 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
- audio3dSetListenerAttributes()
C++ Interface: audio_3d_set_listener_attributes(const AudioManager self, float px, float py, float pz, float vx, float vy, float vz, float fx, float fy, float fz, float ux, float uy, float uz)
// This controls the “set of ears” that listens to 3D spacialized sound px, // py, pz are position coordinates. vx, vy, vz are a velocity vector in // UNITS PER SECOND (default: meters). fx, fy and fz are the respective // components of a unit forward-vector ux, uy and uz are the respective // components of a unit up-vector
- audio_3d_get_distance_factor()
C++ Interface: audio_3d_get_distance_factor(AudioManager self)
- audio_3d_get_doppler_factor()
C++ Interface: audio_3d_get_doppler_factor(AudioManager self)
- audio_3d_get_drop_off_factor()
C++ Interface: audio_3d_get_drop_off_factor(AudioManager self)
- audio_3d_set_distance_factor()
C++ Interface: audio_3d_set_distance_factor(const AudioManager self, float factor)
// Control the “relative scale that sets the distance factor” units for 3D // spacialized audio. This is a float in units-per-meter. Default value is // 1.0, which means that Panda units are understood as meters; for e.g. // feet, set 3.28. This factor is applied only to Fmod and OpenAL at the // moment.
- audio_3d_set_doppler_factor()
C++ Interface: audio_3d_set_doppler_factor(const AudioManager self, float factor)
// Control the presence of the Doppler effect. Default is 1.0 Exaggerated // Doppler, use >1.0 Diminshed Doppler, use <1.0
- audio_3d_set_drop_off_factor()
C++ Interface: audio_3d_set_drop_off_factor(const AudioManager self, float 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
- audio_3d_set_listener_attributes()
C++ Interface: audio_3d_set_listener_attributes(const AudioManager self, float px, float py, float pz, float vx, float vy, float vz, float fx, float fy, float fz, float ux, float uy, float uz)
// This controls the “set of ears” that listens to 3D spacialized sound px, // py, pz are position coordinates. vx, vy, vz are a velocity vector in // UNITS PER SECOND (default: meters). fx, fy and fz are the respective // components of a unit forward-vector ux, uy and uz are the respective // components of a unit up-vector
- clearCache()
C++ Interface: clear_cache(const AudioManager self)
- clear_cache()
C++ Interface: clear_cache(const AudioManager self)
- configureFilters()
C++ Interface: configure_filters(const AudioManager self, FilterProperties config)
- configure_filters()
C++ Interface: configure_filters(const AudioManager self, FilterProperties config)
- createAudioManager()
C++ Interface: create_AudioManager()
- create_AudioManager()
C++ Interface: create_AudioManager()
- dls_pathname = Filename('')
- getActive()
C++ Interface: get_active(AudioManager self)
- getCacheLimit()
C++ Interface: get_cache_limit(AudioManager self)
- getClassType()
C++ Interface: get_class_type()
- getConcurrentSoundLimit()
C++ Interface: get_concurrent_sound_limit(AudioManager self)
- getDlsPathname()
C++ Interface: get_dls_pathname()
- getNullSound()
C++ Interface: get_null_sound(const AudioManager self)
- getSound()
C++ Interface: get_sound(const AudioManager self, MovieAudio source, bool positional, int mode)
// Get a sound:
- getSpeakerSetup()
C++ Interface: get_speaker_setup(const AudioManager self)
- getVolume()
C++ Interface: get_volume(AudioManager self)
- get_active()
C++ Interface: get_active(AudioManager self)
- get_cache_limit()
C++ Interface: get_cache_limit(AudioManager self)
- get_class_type()
C++ Interface: get_class_type()
- get_concurrent_sound_limit()
C++ Interface: get_concurrent_sound_limit(AudioManager self)
- get_dls_pathname()
C++ Interface: get_dls_pathname()
- get_null_sound()
C++ Interface: get_null_sound(const AudioManager self)
- get_sound()
C++ Interface: get_sound(const AudioManager self, MovieAudio source, bool positional, int mode)
// Get a sound:
- get_speaker_setup()
C++ Interface: get_speaker_setup(const AudioManager self)
- get_volume()
C++ Interface: get_volume(AudioManager self)
- isValid()
C++ Interface: is_valid(const AudioManager self)
// If you’re interested in knowing whether this audio manager is valid, // here’s the call to do it. It is not necessary to check whether the audio // manager is valid before making other calls. You are free to use an // invalid sound manager, you may get silent sounds from it though. The // sound manager and the sounds it creates should not crash the application // even when the objects are not valid.
- is_valid()
C++ Interface: is_valid(const AudioManager self)
// If you’re interested in knowing whether this audio manager is valid, // here’s the call to do it. It is not necessary to check whether the audio // manager is valid before making other calls. You are free to use an // invalid sound manager, you may get silent sounds from it though. The // sound manager and the sounds it creates should not crash the application // even when the objects are not valid.
- output()
C++ Interface: output(AudioManager self, ostream out)
- reduceSoundsPlayingTo()
C++ Interface: reduce_sounds_playing_to(const AudioManager self, int count)
// This is likely to be a utility function for the concurrent_sound_limit // options. It is exposed as an API, because it’s reasonable that it may be // useful to be here. It reduces the number of concurrently playing sounds // to count by some implementation specific means. If the number of sounds // currently playing is at or below count then there is no effect.
- reduce_sounds_playing_to()
C++ Interface: reduce_sounds_playing_to(const AudioManager self, int count)
// This is likely to be a utility function for the concurrent_sound_limit // options. It is exposed as an API, because it’s reasonable that it may be // useful to be here. It reduces the number of concurrently playing sounds // to count by some implementation specific means. If the number of sounds // currently playing is at or below count then there is no effect.
- setActive()
C++ Interface: set_active(const AudioManager self, bool flag)
// Turn the manager on or off. If you play a sound while the manager is // inactive, it won’t start. If you deactivate the manager while sounds are // playing, they’ll stop. If you activate the manager while looping sounds // are playing (those that have a loop_count of zero), they will start // playing from the beginning of their loop. Defaults to true.
- setCacheLimit()
C++ Interface: set_cache_limit(const AudioManager self, int count)
- setConcurrentSoundLimit()
C++ Interface: set_concurrent_sound_limit(const AudioManager self, int limit)
// This controls the number of sounds that you allow at once. This is more // of a user choice – it avoids talk over and the creation of a cacophony. // It can also be used to help performance. 0 == unlimited. 1 == mutually // exclusive (one sound at a time). Which is an example of: n == allow n // sounds to be playing at the same time.
- setSpeakerSetup()
C++ Interface: set_speaker_setup(const AudioManager self, int cat)
- setVolume()
C++ Interface: set_volume(const AudioManager self, float volume)
// Control volume: FYI: If you start a sound with the volume off and turn // the volume up later, you’ll hear the sound playing at that late point. 0 // = minimum; 1.0 = maximum. inits to 1.0.
- set_active()
C++ Interface: set_active(const AudioManager self, bool flag)
// Turn the manager on or off. If you play a sound while the manager is // inactive, it won’t start. If you deactivate the manager while sounds are // playing, they’ll stop. If you activate the manager while looping sounds // are playing (those that have a loop_count of zero), they will start // playing from the beginning of their loop. Defaults to true.
- set_cache_limit()
C++ Interface: set_cache_limit(const AudioManager self, int count)
- set_concurrent_sound_limit()
C++ Interface: set_concurrent_sound_limit(const AudioManager self, int limit)
// This controls the number of sounds that you allow at once. This is more // of a user choice – it avoids talk over and the creation of a cacophony. // It can also be used to help performance. 0 == unlimited. 1 == mutually // exclusive (one sound at a time). Which is an example of: n == allow n // sounds to be playing at the same time.
- set_speaker_setup()
C++ Interface: set_speaker_setup(const AudioManager self, int cat)
- set_volume()
C++ Interface: set_volume(const AudioManager self, float volume)
// Control volume: FYI: If you start a sound with the volume off and turn // the volume up later, you’ll hear the sound playing at that late point. 0 // = minimum; 1.0 = maximum. inits to 1.0.
- shutdown()
C++ Interface: shutdown(const AudioManager self)
- stopAllSounds()
C++ Interface: stop_all_sounds(const AudioManager self)
// Stop playback on all sounds managed by this manager. This is effectively // the same as reduce_sounds_playing_to(0), but this call may be for // efficient on some implementations.
- stop_all_sounds()
C++ Interface: stop_all_sounds(const AudioManager self)
// Stop playback on all sounds managed by this manager. This is effectively // the same as reduce_sounds_playing_to(0), but this call may be for // efficient on some implementations.
- uncacheSound()
C++ Interface: uncache_sound(const AudioManager self, const Filename file_name)
// Tell the AudioManager there is no need to keep this one cached. This // doesn’t break any connection between AudioSounds that have already given // by get_sound() from this manager. It’s only affecting whether the // AudioManager keeps a copy of the sound in its poolcache.
- uncache_sound()
C++ Interface: uncache_sound(const AudioManager self, const Filename file_name)
// Tell the AudioManager there is no need to keep this one cached. This // doesn’t break any connection between AudioSounds that have already given // by get_sound() from this manager. It’s only affecting whether the // AudioManager keeps a copy of the sound in its poolcache.
- update()
C++ Interface: update(const AudioManager self)
// This should be called every frame. Failure to call could cause problems.
- write()
C++ Interface: write(AudioManager self, ostream out)