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