1 /**
2 * Copyright (c) 2006-2019 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
Audio()30 Audio::Audio()
31 : distanceModel(DISTANCE_NONE)
32 {
33 }
34
~Audio()35 Audio::~Audio()
36 {
37 }
38
getName() const39 const char *Audio::getName() const
40 {
41 return "love.audio.null";
42 }
43
newSource(love::sound::Decoder *)44 love::audio::Source *Audio::newSource(love::sound::Decoder *)
45 {
46 return new Source();
47 }
48
newSource(love::sound::SoundData *)49 love::audio::Source *Audio::newSource(love::sound::SoundData *)
50 {
51 return new Source();
52 }
53
newSource(int,int,int,int)54 love::audio::Source *Audio::newSource(int, int, int, int)
55 {
56 return new Source();
57 }
58
getActiveSourceCount() const59 int Audio::getActiveSourceCount() const
60 {
61 return 0;
62 }
63
getMaxSources() const64 int Audio::getMaxSources() const
65 {
66 return 0;
67 }
68
play(love::audio::Source *)69 bool Audio::play(love::audio::Source *)
70 {
71 return false;
72 }
73
play(const std::vector<love::audio::Source * > &)74 bool Audio::play(const std::vector<love::audio::Source*>&)
75 {
76 return false;
77 }
78
stop(love::audio::Source *)79 void Audio::stop(love::audio::Source *)
80 {
81 }
82
stop(const std::vector<love::audio::Source * > &)83 void Audio::stop(const std::vector<love::audio::Source*>&)
84 {
85 }
86
stop()87 void Audio::stop()
88 {
89 }
90
pause(love::audio::Source *)91 void Audio::pause(love::audio::Source *)
92 {
93 }
94
pause(const std::vector<love::audio::Source * > &)95 void Audio::pause(const std::vector<love::audio::Source*>&)
96 {
97 }
98
pause()99 std::vector<love::audio::Source*> Audio::pause()
100 {
101 return {};
102 }
103
setVolume(float volume)104 void Audio::setVolume(float volume)
105 {
106 this->volume = volume;
107 }
108
getVolume() const109 float Audio::getVolume() const
110 {
111 return volume;
112 }
113
getPosition(float *) const114 void Audio::getPosition(float *) const
115 {
116 }
117
setPosition(float *)118 void Audio::setPosition(float *)
119 {
120 }
121
getOrientation(float *) const122 void Audio::getOrientation(float *) const
123 {
124 }
125
setOrientation(float *)126 void Audio::setOrientation(float *)
127 {
128 }
129
getVelocity(float *) const130 void Audio::getVelocity(float *) const
131 {
132 }
133
setVelocity(float *)134 void Audio::setVelocity(float *)
135 {
136 }
137
setDopplerScale(float)138 void Audio::setDopplerScale(float)
139 {
140 }
141
getDopplerScale() const142 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 */
getRecordingDevices()156 const std::vector<love::audio::RecordingDevice*> &Audio::getRecordingDevices()
157 {
158 return capture;
159 }
160
getDistanceModel() const161 Audio::DistanceModel Audio::getDistanceModel() const
162 {
163 return this->distanceModel;
164 }
165
setDistanceModel(DistanceModel distanceModel)166 void Audio::setDistanceModel(DistanceModel distanceModel)
167 {
168 this->distanceModel = distanceModel;
169 }
170
setEffect(const char *,std::map<Effect::Parameter,float> &)171 bool Audio::setEffect(const char *, std::map<Effect::Parameter, float> &)
172 {
173 return false;
174 }
175
unsetEffect(const char *)176 bool Audio::unsetEffect(const char *)
177 {
178 return false;
179 }
180
getEffect(const char *,std::map<Effect::Parameter,float> &)181 bool Audio::getEffect(const char *, std::map<Effect::Parameter, float> &)
182 {
183 return false;
184 }
185
getActiveEffects(std::vector<std::string> &) const186 bool Audio::getActiveEffects(std::vector<std::string> &) const
187 {
188 return false;
189 }
190
getMaxSceneEffects() const191 int Audio::getMaxSceneEffects() const
192 {
193 return 0;
194 }
195
getMaxSourceEffects() const196 int Audio::getMaxSourceEffects() const
197 {
198 return 0;
199 }
200
isEFXsupported() const201 bool Audio::isEFXsupported() const
202 {
203 return false;
204 }
205
206 } // null
207 } // audio
208 } // love
209