Panda3D
|
Public Member Functions | |
virtual PN_stdfloat | audio_3d_get_distance_factor () const |
Get value in units per meter. | |
virtual PN_stdfloat | audio_3d_get_doppler_factor () const |
virtual PN_stdfloat | audio_3d_get_drop_off_factor () const |
virtual void | audio_3d_get_listener_attributes (PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz, PN_stdfloat *fx, PN_stdfloat *fy, PN_stdfloat *fz, PN_stdfloat *ux, PN_stdfloat *uy, PN_stdfloat *uz) |
Get position of the "ear" that picks up 3d sounds. | |
virtual void | audio_3d_set_distance_factor (PN_stdfloat factor) |
Set value in units per meter WARNING: OpenAL has no distance factor but we use this as a scale on the min/max distances of sounds to preserve FMOD compatibility. | |
virtual void | audio_3d_set_doppler_factor (PN_stdfloat factor) |
Exaggerates or diminishes the Doppler effect. | |
virtual void | audio_3d_set_drop_off_factor (PN_stdfloat factor) |
Control the effect distance has on audability. | |
virtual void | audio_3d_set_listener_attributes (PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat xy, PN_stdfloat xz, PN_stdfloat fx, PN_stdfloat fy, PN_stdfloat fz, PN_stdfloat ux, PN_stdfloat uy, PN_stdfloat uz) |
Set position of the "ear" that picks up 3d sounds NOW LISTEN UP!!! THIS IS IMPORTANT! Both Panda3D and OpenAL use a right handed coordinate system. | |
virtual void | clear_cache () |
Clear out the sound cache. | |
virtual TypeHandle | force_init_type () |
virtual bool | get_active () const |
virtual unsigned int | get_cache_limit () const |
virtual unsigned int | get_concurrent_sound_limit () const |
PN_stdfloat | get_play_rate () const |
get the overall speed/pitch/play rate | |
virtual TypeHandle | get_type () const |
virtual PN_stdfloat | get_volume () const |
Gets listener gain. | |
virtual bool | is_valid () |
This is mostly for debugging, but it it could be used to detect errors in a release build if you don't mind the cpu cost. | |
virtual | PT (AudioSound) get_sound(const Filename & |
virtual | PT (AudioSound) get_sound(MovieAudio *sound |
virtual void | reduce_sounds_playing_to (unsigned int count) |
virtual void | set_active (bool) |
Turn on/off Warning: not implemented. | |
virtual void | set_cache_limit (unsigned int count) |
Set the number of sounds that the cache can hold. | |
virtual void | set_concurrent_sound_limit (unsigned int limit=0) |
void | set_play_rate (PN_stdfloat play_rate) |
set the overall play rate | |
virtual void | set_volume (PN_stdfloat) |
Sets listener gain. | |
virtual void | shutdown () |
Call this at exit time to shut down the audio system. | |
virtual void | stop_all_sounds () |
Stop playback on all sounds managed by this manager. | |
virtual void | uncache_sound (const Filename &) |
Deletes a sample from the expiration queues. | |
virtual void | update () |
Perform all per-frame update functions. | |
![]() | |
virtual bool | configure_filters (FilterProperties *config) |
Configures the global DSP filter chain. | |
virtual int | get_speaker_setup () |
virtual void | output (std::ostream &out) const |
PT (AudioSound) get_null_sound() | |
virtual void | set_speaker_configuration (LVecBase3 *speaker1, LVecBase3 *speaker2=nullptr, LVecBase3 *speaker3=nullptr, LVecBase3 *speaker4=nullptr, LVecBase3 *speaker5=nullptr, LVecBase3 *speaker6=nullptr, LVecBase3 *speaker7=nullptr, LVecBase3 *speaker8=nullptr, LVecBase3 *speaker9=nullptr) |
For use only with Miles. | |
virtual void | set_speaker_setup (SpeakerModeCategory cat) |
virtual void | write (std::ostream &out) const |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static Filename | get_dls_pathname () |
static void | init_type () |
static | PT (AudioManager) create_AudioManager() |
static void | register_AudioManager_creator (Create_AudioManager_proc *proc) |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
virtual bool int | mode =SM_heuristic) |
virtual bool | positional = false |
![]() | |
get_dls_pathname | |
Returns the full pathname to the DLS file, as specified by the Config.prc file, or the default for the current OS if appropriate. | |
virtual bool int | mode =SM_heuristic) = 0 |
virtual bool | positional = false |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
Friends | |
class | OpenALAudioSound |
class | OpenALSoundData |
Additional Inherited Members | |
![]() | |
enum | SpeakerId { SPK_none , SPK_frontleft , SPK_frontright , SPK_center , SPK_sub , SPK_backleft , SPK_backright , SPK_sideleft , SPK_sideright , SPK_COUNT } |
enum | SpeakerModeCategory { SPEAKERMODE_raw , SPEAKERMODE_mono , SPEAKERMODE_stereo , SPEAKERMODE_quad , SPEAKERMODE_surround , SPEAKERMODE_5point1 , SPEAKERMODE_7point1 , SPEAKERMODE_max , SPEAKERMODE_COUNT } |
enum | StreamMode { SM_heuristic , SM_sample , SM_stream } |
Definition at line 39 of file openalAudioManager.h.
OpenALAudioManager::OpenALAudioManager | ( | ) |
Definition at line 82 of file openalAudioManager.cxx.
|
virtual |
Definition at line 200 of file openalAudioManager.cxx.
|
virtual |
Get value in units per meter.
Reimplemented from AudioManager.
Definition at line 793 of file openalAudioManager.cxx.
|
virtual |
Reimplemented from AudioManager.
Definition at line 816 of file openalAudioManager.cxx.
|
virtual |
Reimplemented from AudioManager.
Definition at line 838 of file openalAudioManager.cxx.
|
virtual |
Get position of the "ear" that picks up 3d sounds.
Reimplemented from AudioManager.
Definition at line 735 of file openalAudioManager.cxx.
|
virtual |
Set value in units per meter WARNING: OpenAL has no distance factor but we use this as a scale on the min/max distances of sounds to preserve FMOD compatibility.
Also adjusts the speed of sound to compensate for unit difference.
Reimplemented from AudioManager.
Definition at line 761 of file openalAudioManager.cxx.
|
virtual |
Exaggerates or diminishes the Doppler effect.
Defaults to 1.0
Reimplemented from AudioManager.
Definition at line 801 of file openalAudioManager.cxx.
|
virtual |
Control the effect distance has on audability.
Defaults to 1.0
Reimplemented from AudioManager.
Definition at line 824 of file openalAudioManager.cxx.
|
virtual |
Set position of the "ear" that picks up 3d sounds NOW LISTEN UP!!! THIS IS IMPORTANT! Both Panda3D and OpenAL use a right handed coordinate system.
But there is a major difference! In Panda3D the Y-Axis is going into the Screen and the Z-Axis is going up. In OpenAL the Y-Axis is going up and the Z-Axis is coming out of the screen. The solution is simple, we just flip the Y and Z axis and negate the Z, as we move coordinates from Panda to OpenAL and back. What does did mean to average Panda user? Nothing, they shouldn't notice anyway. But if you decide to do any 3D audio work in here you have to keep it in mind. I told you, so you can't say I didn't.
Reimplemented from AudioManager.
Definition at line 701 of file openalAudioManager.cxx.
|
virtual |
Clear out the sound cache.
Implements AudioManager.
Definition at line 571 of file openalAudioManager.cxx.
|
inlinevirtual |
Reimplemented from AudioManager.
Definition at line 231 of file openalAudioManager.h.
|
virtual |
Implements AudioManager.
Definition at line 685 of file openalAudioManager.cxx.
|
virtual |
Implements AudioManager.
Definition at line 590 of file openalAudioManager.cxx.
|
inlinestatic |
Definition at line 221 of file openalAudioManager.h.
|
virtual |
Implements AudioManager.
Definition at line 919 of file openalAudioManager.cxx.
PN_stdfloat OpenALAudioManager::get_play_rate | ( | ) | const |
get the overall speed/pitch/play rate
Definition at line 661 of file openalAudioManager.cxx.
|
inlinevirtual |
Reimplemented from AudioManager.
Definition at line 228 of file openalAudioManager.h.
|
virtual |
|
inlinestatic |
Definition at line 224 of file openalAudioManager.h.
|
virtual |
This is mostly for debugging, but it it could be used to detect errors in a release build if you don't mind the cpu cost.
Implements AudioManager.
Definition at line 234 of file openalAudioManager.cxx.
Referenced by PT(), and uncache_sound().
|
virtual |
Reimplemented from AudioManager.
|
virtual |
Reimplemented from AudioManager.
|
virtual |
Implements AudioManager.
Definition at line 927 of file openalAudioManager.cxx.
|
virtual |
Turn on/off Warning: not implemented.
Implements AudioManager.
Definition at line 669 of file openalAudioManager.cxx.
|
virtual |
Set the number of sounds that the cache can hold.
Implements AudioManager.
Definition at line 580 of file openalAudioManager.cxx.
|
virtual |
Implements AudioManager.
Definition at line 909 of file openalAudioManager.cxx.
void OpenALAudioManager::set_play_rate | ( | PN_stdfloat | play_rate | ) |
set the overall play rate
Definition at line 645 of file openalAudioManager.cxx.
|
virtual |
|
virtual |
Call this at exit time to shut down the audio system.
This will invalidate all currently-active AudioManagers and AudioSounds in the system. If you change your mind and want to play sounds again, you will have to recreate all of these objects.
Reimplemented from AudioManager.
Definition at line 216 of file openalAudioManager.cxx.
|
virtual |
Stop playback on all sounds managed by this manager.
Implements AudioManager.
Definition at line 951 of file openalAudioManager.cxx.
|
virtual |
Deletes a sample from the expiration queues.
If the sound is actively in use, then the sound cannot be deleted, and this function has no effect.
Implements AudioManager.
Definition at line 531 of file openalAudioManager.cxx.
References VirtualFileSystem::get_global_ptr(), is_valid(), and VirtualFileSystem::resolve_filename().
|
virtual |
Perform all per-frame update functions.
Reimplemented from AudioManager.
Definition at line 960 of file openalAudioManager.cxx.
References TrueClock::get_global_ptr().
|
friend |
Definition at line 42 of file openalAudioManager.h.
|
friend |
Definition at line 43 of file openalAudioManager.h.
bool int OpenALAudioManager::mode =SM_heuristic) |
Definition at line 54 of file openalAudioManager.h.
bool OpenALAudioManager::positional = false |
Definition at line 54 of file openalAudioManager.h.