Panda3D
|
00001 // Filename: nullAudioManager.h 00002 // Created by: skyler (June 6, 2001) 00003 // Prior system by: cary 00004 // 00005 //////////////////////////////////////////////////////////////////// 00006 // 00007 // PANDA 3D SOFTWARE 00008 // Copyright (c) Carnegie Mellon University. All rights reserved. 00009 // 00010 // All use of this software is subject to the terms of the revised BSD 00011 // license. You should have received a copy of this license along 00012 // with this source code in a file named "LICENSE." 00013 // 00014 //////////////////////////////////////////////////////////////////// 00015 00016 #ifndef __NULL_AUDIO_MANAGER_H__ 00017 #define __NULL_AUDIO_MANAGER_H__ 00018 00019 #include "audioManager.h" 00020 #include "nullAudioSound.h" 00021 00022 class EXPCL_PANDA_AUDIO NullAudioManager : public AudioManager { 00023 // All of these methods are stubbed out to some degree. 00024 // If you're looking for a starting place for a new AudioManager, 00025 // please consider looking at the milesAudioManager. 00026 00027 public: 00028 NullAudioManager(); 00029 virtual ~NullAudioManager(); 00030 00031 virtual bool is_valid(); 00032 00033 virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic); 00034 virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic); 00035 virtual void uncache_sound(const string&); 00036 virtual void clear_cache(); 00037 virtual void set_cache_limit(unsigned int); 00038 virtual unsigned int get_cache_limit() const; 00039 00040 virtual void set_volume(float); 00041 virtual float get_volume() const; 00042 00043 virtual void set_play_rate(float); 00044 virtual float get_play_rate() const; 00045 00046 virtual void set_active(bool); 00047 virtual bool get_active() const; 00048 00049 virtual void set_concurrent_sound_limit(unsigned int limit); 00050 virtual unsigned int get_concurrent_sound_limit() const; 00051 00052 virtual void reduce_sounds_playing_to(unsigned int count); 00053 00054 virtual void stop_all_sounds(); 00055 00056 virtual void audio_3d_set_listener_attributes(float px, float py, float pz, 00057 float vx, float vy, float vz, 00058 float fx, float fy, float fz, 00059 float ux, float uy, float uz); 00060 virtual void audio_3d_get_listener_attributes(float *px, float *py, float *pz, 00061 float *vx, float *vy, float *vz, 00062 float *fx, float *fy, float *fz, 00063 float *ux, float *uy, float *uz); 00064 00065 virtual void audio_3d_set_distance_factor(float factor); 00066 virtual float audio_3d_get_distance_factor() const; 00067 00068 virtual void audio_3d_set_doppler_factor(float factor); 00069 virtual float audio_3d_get_doppler_factor() const; 00070 00071 virtual void audio_3d_set_drop_off_factor(float factor); 00072 virtual float audio_3d_get_drop_off_factor() const; 00073 00074 00075 public: 00076 static TypeHandle get_class_type() { 00077 return _type_handle; 00078 } 00079 static void init_type() { 00080 AudioManager::init_type(); 00081 register_type(_type_handle, "NullAudioManager", 00082 AudioManager::get_class_type()); 00083 } 00084 virtual TypeHandle get_type() const { 00085 return get_class_type(); 00086 } 00087 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00088 00089 private: 00090 static TypeHandle _type_handle; 00091 }; 00092 00093 #endif /* __NULL_AUDIO_MANAGER_H__ */