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 "Source.h"
22
23namespace love
24{
25namespace audio
26{
27namespace null
28{
29
30Source::Source()
31 : love::audio::Source(Source::TYPE_STATIC)
32{
33}
34
35Source::~Source()
36{
37}
38
39love::audio::Source *Source::clone()
40{
41 this->retain();
42 return this;
43}
44
45bool Source::play()
46{
47 return false;
48}
49
50void Source::stop()
51{
52}
53
54void Source::pause()
55{
56}
57
58bool Source::isPlaying() const
59{
60 return false;
61}
62
63bool Source::isFinished() const
64{
65 return true;
66}
67
68bool Source::update()
69{
70 return false;
71}
72
73void Source::setPitch(float pitch)
74{
75 this->pitch = pitch;
76}
77
78float Source::getPitch() const
79{
80 return pitch;
81}
82
83void Source::setVolume(float volume)
84{
85 this->volume = volume;
86}
87
88float Source::getVolume() const
89{
90 return volume;
91}
92
93void Source::seek(double, Source::Unit)
94{
95}
96
97double Source::tell(Source::Unit)
98{
99 return 0.0f;
100}
101
102double Source::getDuration(Unit)
103{
104 return -1.0f;
105}
106
107void Source::setPosition(float *)
108{
109}
110
111void Source::getPosition(float *) const
112{
113}
114
115void Source::setVelocity(float *)
116{
117}
118
119void Source::getVelocity(float *) const
120{
121}
122
123void Source::setDirection(float *)
124{
125}
126
127void Source::getDirection(float *) const
128{
129}
130
131void Source::setCone(float innerAngle, float outerAngle, float outerVolume, float outerHighGain)
132{
133 coneInnerAngle = innerAngle;
134 coneOuterAngle = outerAngle;
135 coneOuterVolume = outerVolume;
136 coneOuterHighGain = outerHighGain;
137}
138
139void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume, float &outerHighGain) const
140{
141 innerAngle = coneInnerAngle;
142 outerAngle = coneOuterAngle;
143 outerVolume = coneOuterVolume;
144 outerHighGain = coneOuterHighGain;
145}
146
147void Source::setRelative(bool enable)
148{
149 relative = enable;
150}
151
152bool Source::isRelative() const
153{
154 return relative;
155}
156
157void Source::setLooping(bool looping)
158{
159 this->looping = looping;
160}
161
162bool Source::isLooping() const
163{
164 return looping;
165}
166
167void Source::setMinVolume(float volume)
168{
169 this->minVolume = volume;
170}
171
172float Source::getMinVolume() const
173{
174 return this->minVolume;
175}
176
177void Source::setMaxVolume(float volume)
178{
179 this->maxVolume = volume;
180}
181
182float Source::getMaxVolume() const
183{
184 return this->maxVolume;
185}
186
187void Source::setReferenceDistance(float distance)
188{
189 this->referenceDistance = distance;
190}
191
192float Source::getReferenceDistance() const
193{
194 return this->referenceDistance;
195}
196
197void Source::setRolloffFactor(float factor)
198{
199 this->rolloffFactor = factor;
200}
201
202float Source::getRolloffFactor() const
203{
204 return this->rolloffFactor;
205}
206
207void Source::setMaxDistance(float distance)
208{
209 this->maxDistance = distance;
210}
211
212float Source::getMaxDistance() const
213{
214 return this->maxDistance;
215}
216
217void Source::setAirAbsorptionFactor(float factor)
218{
219 absorptionFactor = factor;
220}
221
222float Source::getAirAbsorptionFactor() const
223{
224 return absorptionFactor;
225}
226
227int Source::getChannelCount() const
228{
229 return 2;
230}
231
232int Source::getFreeBufferCount() const
233{
234 return 0;
235}
236
237bool Source::queue(void *, size_t, int, int, int)
238{
239 return false;
240}
241
242bool Source::setFilter(const std::map<Filter::Parameter, float> &)
243{
244 return false;
245}
246
247bool Source::setFilter()
248{
249 return false;
250}
251
252bool Source::getFilter(std::map<Filter::Parameter, float> &)
253{
254 return false;
255}
256
257bool Source::setEffect(const char *)
258{
259 return false;
260}
261
262bool Source::setEffect(const char *, const std::map<Filter::Parameter, float> &)
263{
264 return false;
265}
266
267bool Source::unsetEffect(const char *)
268{
269 return false;
270}
271
272bool Source::getEffect(const char *, std::map<Filter::Parameter, float> &)
273{
274 return false;
275}
276
277bool Source::getActiveEffects(std::vector<std::string> &) const
278{
279 return false;
280}
281
282} // null
283} // audio
284} // love
285