1 | /** |
2 | * Copyright (c) 2006-2023 LOVE Development Team |
3 | * |
4 | * This software is provided 'as-is', without any express or implied |
5 | * warranty. In no event will the authors be held liable for any damages |
6 | * arising from the use of this software. |
7 | * |
8 | * Permission is granted to anyone to use this software for any purpose, |
9 | * including commercial applications, and to alter it and redistribute it |
10 | * freely, subject to the following restrictions: |
11 | * |
12 | * 1. The origin of this software must not be misrepresented; you must not |
13 | * claim that you wrote the original software. If you use this software |
14 | * in a product, an acknowledgment in the product documentation would be |
15 | * appreciated but is not required. |
16 | * 2. Altered source versions must be plainly marked as such, and must not be |
17 | * misrepresented as being the original software. |
18 | * 3. This notice may not be removed or altered from any source distribution. |
19 | **/ |
20 | |
21 | #include "Audio.h" |
22 | |
23 | namespace love |
24 | { |
25 | namespace audio |
26 | { |
27 | namespace null |
28 | { |
29 | |
30 | Audio::Audio() |
31 | : distanceModel(DISTANCE_NONE) |
32 | { |
33 | } |
34 | |
35 | Audio::~Audio() |
36 | { |
37 | } |
38 | |
39 | const char *Audio::getName() const |
40 | { |
41 | return "love.audio.null" ; |
42 | } |
43 | |
44 | love::audio::Source *Audio::newSource(love::sound::Decoder *) |
45 | { |
46 | return new Source(); |
47 | } |
48 | |
49 | love::audio::Source *Audio::newSource(love::sound::SoundData *) |
50 | { |
51 | return new Source(); |
52 | } |
53 | |
54 | love::audio::Source *Audio::newSource(int, int, int, int) |
55 | { |
56 | return new Source(); |
57 | } |
58 | |
59 | int Audio::getActiveSourceCount() const |
60 | { |
61 | return 0; |
62 | } |
63 | |
64 | int Audio::getMaxSources() const |
65 | { |
66 | return 0; |
67 | } |
68 | |
69 | bool Audio::play(love::audio::Source *) |
70 | { |
71 | return false; |
72 | } |
73 | |
74 | bool Audio::play(const std::vector<love::audio::Source*>&) |
75 | { |
76 | return false; |
77 | } |
78 | |
79 | void Audio::stop(love::audio::Source *) |
80 | { |
81 | } |
82 | |
83 | void Audio::stop(const std::vector<love::audio::Source*>&) |
84 | { |
85 | } |
86 | |
87 | void Audio::stop() |
88 | { |
89 | } |
90 | |
91 | void Audio::pause(love::audio::Source *) |
92 | { |
93 | } |
94 | |
95 | void Audio::pause(const std::vector<love::audio::Source*>&) |
96 | { |
97 | } |
98 | |
99 | std::vector<love::audio::Source*> Audio::pause() |
100 | { |
101 | return {}; |
102 | } |
103 | |
104 | void Audio::setVolume(float volume) |
105 | { |
106 | this->volume = volume; |
107 | } |
108 | |
109 | float Audio::getVolume() const |
110 | { |
111 | return volume; |
112 | } |
113 | |
114 | void Audio::getPosition(float *) const |
115 | { |
116 | } |
117 | |
118 | void Audio::setPosition(float *) |
119 | { |
120 | } |
121 | |
122 | void Audio::getOrientation(float *) const |
123 | { |
124 | } |
125 | |
126 | void Audio::setOrientation(float *) |
127 | { |
128 | } |
129 | |
130 | void Audio::getVelocity(float *) const |
131 | { |
132 | } |
133 | |
134 | void Audio::setVelocity(float *) |
135 | { |
136 | } |
137 | |
138 | void Audio::setDopplerScale(float) |
139 | { |
140 | } |
141 | |
142 | float Audio::getDopplerScale() const |
143 | { |
144 | return 1.0f; |
145 | } |
146 | /* |
147 | void setMeter(float) |
148 | { |
149 | } |
150 | |
151 | float getMeter() const |
152 | { |
153 | return 1.0f; |
154 | } |
155 | */ |
156 | const std::vector<love::audio::RecordingDevice*> &Audio::getRecordingDevices() |
157 | { |
158 | return capture; |
159 | } |
160 | |
161 | Audio::DistanceModel Audio::getDistanceModel() const |
162 | { |
163 | return this->distanceModel; |
164 | } |
165 | |
166 | void Audio::setDistanceModel(DistanceModel distanceModel) |
167 | { |
168 | this->distanceModel = distanceModel; |
169 | } |
170 | |
171 | bool Audio::setEffect(const char *, std::map<Effect::Parameter, float> &) |
172 | { |
173 | return false; |
174 | } |
175 | |
176 | bool Audio::unsetEffect(const char *) |
177 | { |
178 | return false; |
179 | } |
180 | |
181 | bool Audio::getEffect(const char *, std::map<Effect::Parameter, float> &) |
182 | { |
183 | return false; |
184 | } |
185 | |
186 | bool Audio::getActiveEffects(std::vector<std::string> &) const |
187 | { |
188 | return false; |
189 | } |
190 | |
191 | int Audio::getMaxSceneEffects() const |
192 | { |
193 | return 0; |
194 | } |
195 | |
196 | int Audio::getMaxSourceEffects() const |
197 | { |
198 | return 0; |
199 | } |
200 | |
201 | bool Audio::isEFXsupported() const |
202 | { |
203 | return false; |
204 | } |
205 | |
206 | void Audio::pauseContext() |
207 | { |
208 | } |
209 | |
210 | void Audio::resumeContext() |
211 | { |
212 | } |
213 | |
214 | |
215 | } // null |
216 | } // audio |
217 | } // love |
218 | |