Panda3D
 All Classes Functions Variables Enumerations
nullAudioManager.h
1 // Filename: nullAudioManager.h
2 // Created by: skyler (June 6, 2001)
3 // Prior system by: cary
4 //
5 ////////////////////////////////////////////////////////////////////
6 //
7 // PANDA 3D SOFTWARE
8 // Copyright (c) Carnegie Mellon University. All rights reserved.
9 //
10 // All use of this software is subject to the terms of the revised BSD
11 // license. You should have received a copy of this license along
12 // with this source code in a file named "LICENSE."
13 //
14 ////////////////////////////////////////////////////////////////////
15 
16 #ifndef __NULL_AUDIO_MANAGER_H__
17 #define __NULL_AUDIO_MANAGER_H__
18 
19 #include "audioManager.h"
20 #include "nullAudioSound.h"
21 
22 class EXPCL_PANDA_AUDIO NullAudioManager : public AudioManager {
23  // All of these methods are stubbed out to some degree.
24  // If you're looking for a starting place for a new AudioManager,
25  // please consider looking at the milesAudioManager.
26 
27 public:
29  virtual ~NullAudioManager();
30 
31  virtual bool is_valid();
32 
33  virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic);
34  virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic);
35  virtual void uncache_sound(const string&);
36  virtual void clear_cache();
37  virtual void set_cache_limit(unsigned int);
38  virtual unsigned int get_cache_limit() const;
39 
40  virtual void set_volume(PN_stdfloat);
41  virtual PN_stdfloat get_volume() const;
42 
43  virtual void set_play_rate(PN_stdfloat);
44  virtual PN_stdfloat get_play_rate() const;
45 
46  virtual void set_active(bool);
47  virtual bool get_active() const;
48 
49  virtual void set_concurrent_sound_limit(unsigned int limit);
50  virtual unsigned int get_concurrent_sound_limit() const;
51 
52  virtual void reduce_sounds_playing_to(unsigned int count);
53 
54  virtual void stop_all_sounds();
55 
56  virtual void audio_3d_set_listener_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz,
57  PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz,
58  PN_stdfloat fx, PN_stdfloat fy, PN_stdfloat fz,
59  PN_stdfloat ux, PN_stdfloat uy, PN_stdfloat uz);
60  virtual void audio_3d_get_listener_attributes(PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz,
61  PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz,
62  PN_stdfloat *fx, PN_stdfloat *fy, PN_stdfloat *fz,
63  PN_stdfloat *ux, PN_stdfloat *uy, PN_stdfloat *uz);
64 
65  virtual void audio_3d_set_distance_factor(PN_stdfloat factor);
66  virtual PN_stdfloat audio_3d_get_distance_factor() const;
67 
68  virtual void audio_3d_set_doppler_factor(PN_stdfloat factor);
69  virtual PN_stdfloat audio_3d_get_doppler_factor() const;
70 
71  virtual void audio_3d_set_drop_off_factor(PN_stdfloat factor);
72  virtual PN_stdfloat audio_3d_get_drop_off_factor() const;
73 
74 
75 public:
76  static TypeHandle get_class_type() {
77  return _type_handle;
78  }
79  static void init_type() {
80  AudioManager::init_type();
81  register_type(_type_handle, "NullAudioManager",
82  AudioManager::get_class_type());
83  }
84  virtual TypeHandle get_type() const {
85  return get_class_type();
86  }
87  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
88 
89 private:
90  static TypeHandle _type_handle;
91 };
92 
93 #endif /* __NULL_AUDIO_MANAGER_H__ */
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
A MovieAudio is actually any source that provides a sequence of audio samples.
Definition: movieAudio.h:48