Panda3D
audioSound.cxx
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 audioSound.cxx
10  * @author skyler
11  * @date 2001-06-06
12  * Prior system by: cary
13  */
14 
15 #include "audioSound.h"
16 
17 using std::ostream;
18 
19 TypeHandle AudioSound::_type_handle;
20 
21 /**
22  *
23  */
24 AudioSound::
25 ~AudioSound() {
26 }
27 
28 /**
29  *
30  */
31 AudioSound::
32 AudioSound() {
33  // Intentionally blank.
34 }
35 
36 
37 void AudioSound::
38 set_3d_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz) {
39  // Intentionally blank.
40 }
41 
42 void AudioSound::
43 get_3d_attributes(PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz) {
44  // Intentionally blank.
45 }
46 
47 void AudioSound::
48 set_3d_min_distance(PN_stdfloat dist) {
49  // Intentionally blank.
50 }
51 
52 PN_stdfloat AudioSound::
53 get_3d_min_distance() const {
54  // Intentionally blank.
55  return 0.0f;
56 }
57 
58 void AudioSound::
59 set_3d_max_distance(PN_stdfloat dist) {
60  // Intentionally blank.
61 }
62 
63 PN_stdfloat AudioSound::
64 get_3d_max_distance() const {
65  // Intentionally blank.
66  return 0.0f;
67 }
68 
69 /**
70  * For use only with FMOD.
71  */
72 PN_stdfloat AudioSound::
73 get_speaker_mix(int speaker) {
74  // intentionally blank
75  return 0.0;
76 }
77 
78 /**
79  * For use only with FMOD.
80  */
81 void AudioSound::
82 set_speaker_mix(PN_stdfloat frontleft, PN_stdfloat frontright, PN_stdfloat center, PN_stdfloat sub, PN_stdfloat backleft, PN_stdfloat backright, PN_stdfloat sideleft, PN_stdfloat sideright) {
83  // intentionally blank
84 }
85 
86 /**
87  * For use only with Miles.
88  */
89 PN_stdfloat AudioSound::
90 get_speaker_level(int index) {
91  // intentionally blank
92  return 0.0;
93 }
94 
95 /**
96  * For use only with Miles.
97  */
98 void AudioSound::
99 set_speaker_levels(PN_stdfloat level1, PN_stdfloat level2, PN_stdfloat level3, PN_stdfloat level4, PN_stdfloat level5, PN_stdfloat level6, PN_stdfloat level7, PN_stdfloat level8, PN_stdfloat level9) {
100  // intentionally blank
101 }
102 
103 /**
104  * Configure the local DSP filter chain.
105  *
106  * There is no guarantee that any given configuration will be supported by the
107  * implementation. The only way to find out what's supported is to call
108  * configure_filters. If it returns true, the configuration is supported.
109  */
110 bool AudioSound::
112  const FilterProperties::ConfigVector &conf = config->get_config();
113  if (conf.empty()) {
114  return true;
115  } else {
116  return false;
117  }
118 }
119 
120 /**
121  *
122  */
123 int AudioSound::
124 get_priority() {
125  // intentionally blank
126  return 0;
127 }
128 
129 /**
130  *
131  */
132 void AudioSound::
133 set_priority(int priority) {
134  // intentionally blank
135  ;
136 }
137 
138 /**
139  *
140  */
141 void AudioSound::
142 output(ostream &out) const {
143  out << get_type() << " " << get_name() << " " << status();
144 }
145 
146 /**
147  *
148  */
149 void AudioSound::
150 write(ostream &out) const {
151  out << (*this) << "\n";
152 }
153 
154 /**
155  *
156  */
157 ostream &
158 operator << (ostream &out, AudioSound::SoundStatus status) {
159  switch (status) {
160  case AudioSound::BAD:
161  return out << "BAD";
162 
163  case AudioSound::READY:
164  return out << "READY";
165 
166  case AudioSound::PLAYING:
167  return out << "PLAYING";
168  }
169 
170  return out << "**invalid AudioSound::SoundStatus(" << (int)status << ")**";
171 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Stores a configuration for a set of audio DSP filters.
virtual void set_speaker_mix(PN_stdfloat frontleft, PN_stdfloat frontright, PN_stdfloat center, PN_stdfloat sub, PN_stdfloat backleft, PN_stdfloat backright, PN_stdfloat sideleft, PN_stdfloat sideright)
For use only with FMOD.
Definition: audioSound.cxx:82
const ConfigVector & get_config()
Intended for use by AudioManager and AudioSound implementations: allows access to the config vector.
virtual bool configure_filters(FilterProperties *config)
Configure the local DSP filter chain.
Definition: audioSound.cxx:111
virtual PN_stdfloat get_speaker_mix(int speaker)
For use only with FMOD.
Definition: audioSound.cxx:73
virtual void set_speaker_levels(PN_stdfloat level1, PN_stdfloat level2=-1.0f, PN_stdfloat level3=-1.0f, PN_stdfloat level4=-1.0f, PN_stdfloat level5=-1.0f, PN_stdfloat level6=-1.0f, PN_stdfloat level7=-1.0f, PN_stdfloat level8=-1.0f, PN_stdfloat level9=-1.0f)
For use only with Miles.
Definition: audioSound.cxx:99
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
virtual PN_stdfloat get_speaker_level(int index)
For use only with Miles.
Definition: audioSound.cxx:90