Panda3D
Loading...
Searching...
No Matches
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
17using std::ostream;
18
19TypeHandle AudioSound::_type_handle;
20
21/**
22 *
23 */
24AudioSound::
25~AudioSound() {
26}
27
28/**
29 *
30 */
31AudioSound::
32AudioSound() {
33 // Intentionally blank.
34}
35
36
37void AudioSound::
38set_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
42void AudioSound::
43get_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
47void AudioSound::
48set_3d_min_distance(PN_stdfloat dist) {
49 // Intentionally blank.
50}
51
52PN_stdfloat AudioSound::
53get_3d_min_distance() const {
54 // Intentionally blank.
55 return 0.0f;
56}
57
58void AudioSound::
59set_3d_max_distance(PN_stdfloat dist) {
60 // Intentionally blank.
61}
62
63PN_stdfloat AudioSound::
64get_3d_max_distance() const {
65 // Intentionally blank.
66 return 0.0f;
67}
68
69/**
70 * For use only with FMOD.
71 */
72PN_stdfloat AudioSound::
73get_speaker_mix(int speaker) {
74 // intentionally blank
75 return 0.0;
76}
77
78/**
79 * For use only with FMOD.
80 */
82set_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 */
89PN_stdfloat AudioSound::
90get_speaker_level(int index) {
91 // intentionally blank
92 return 0.0;
93}
94
95/**
96 * For use only with Miles.
97 */
99set_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 */
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 */
123int AudioSound::
124get_priority() {
125 // intentionally blank
126 return 0;
127}
128
129/**
130 *
131 */
132void AudioSound::
133set_priority(int priority) {
134 // intentionally blank
135 ;
136}
137
138/**
139 *
140 */
141void AudioSound::
142output(ostream &out) const {
143 out << get_type() << " " << get_name() << " " << status();
144}
145
146/**
147 *
148 */
149void AudioSound::
150write(ostream &out) const {
151 out << (*this) << "\n";
152}
153
154/**
155 *
156 */
157ostream &
158operator << (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.
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.
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.
virtual PN_stdfloat get_speaker_level(int index)
For use only with Miles.
virtual PN_stdfloat get_speaker_mix(int speaker)
For use only with FMOD.
virtual bool configure_filters(FilterProperties *config)
Configure the local DSP filter chain.
Stores a configuration for a set of audio DSP filters.
const ConfigVector & get_config()
Intended for use by AudioManager and AudioSound implementations: allows access to the config vector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81