1 /**
2  * Copyright (c) 2006-2016 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 
23 namespace love
24 {
25 namespace audio
26 {
27 namespace null
28 {
29 
Source()30 Source::Source()
31 	: love::audio::Source(Source::TYPE_STATIC)
32 {
33 }
34 
~Source()35 Source::~Source()
36 {
37 }
38 
clone()39 love::audio::Source *Source::clone()
40 {
41 	this->retain();
42 	return this;
43 }
44 
play()45 bool Source::play()
46 {
47 	return false;
48 }
49 
stop()50 void Source::stop()
51 {
52 }
53 
pause()54 void Source::pause()
55 {
56 }
57 
resume()58 void Source::resume()
59 {
60 }
61 
rewind()62 void Source::rewind()
63 {
64 }
65 
isStopped() const66 bool Source::isStopped() const
67 {
68 	return true;
69 }
70 
isPaused() const71 bool Source::isPaused() const
72 {
73 	return false;
74 }
75 
isFinished() const76 bool Source::isFinished() const
77 {
78 	return true;
79 }
80 
update()81 bool Source::update()
82 {
83 	return false;
84 }
85 
setPitch(float pitch)86 void Source::setPitch(float pitch)
87 {
88 	this->pitch = pitch;
89 }
90 
getPitch() const91 float Source::getPitch() const
92 {
93 	return pitch;
94 }
95 
setVolume(float volume)96 void Source::setVolume(float volume)
97 {
98 	this->volume = volume;
99 }
100 
getVolume() const101 float Source::getVolume() const
102 {
103 	return volume;
104 }
105 
seek(float,Source::Unit)106 void Source::seek(float, Source::Unit)
107 {
108 }
109 
tell(Source::Unit)110 float Source::tell(Source::Unit)
111 {
112 	return 0.0f;
113 }
114 
getDuration(Unit)115 double Source::getDuration(Unit)
116 {
117 	return -1.0f;
118 }
119 
setPosition(float *)120 void Source::setPosition(float *)
121 {
122 }
123 
getPosition(float *) const124 void Source::getPosition(float *) const
125 {
126 }
127 
setVelocity(float *)128 void Source::setVelocity(float *)
129 {
130 }
131 
getVelocity(float *) const132 void Source::getVelocity(float *) const
133 {
134 }
135 
setDirection(float *)136 void Source::setDirection(float *)
137 {
138 }
139 
getDirection(float *) const140 void Source::getDirection(float *) const
141 {
142 }
143 
setCone(float innerAngle,float outerAngle,float outerVolume)144 void Source::setCone(float innerAngle, float outerAngle, float outerVolume)
145 {
146 	coneInnerAngle = innerAngle;
147 	coneOuterAngle = outerAngle;
148 	coneOuterVolume = outerVolume;
149 }
150 
getCone(float & innerAngle,float & outerAngle,float & outerVolume) const151 void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume) const
152 {
153 	innerAngle = coneInnerAngle;
154 	outerAngle = coneOuterAngle;
155 	outerVolume = coneOuterVolume;
156 }
157 
setRelative(bool enable)158 void Source::setRelative(bool enable)
159 {
160 	relative = enable;
161 }
162 
isRelative() const163 bool Source::isRelative() const
164 {
165 	return relative;
166 }
167 
setLooping(bool looping)168 void Source::setLooping(bool looping)
169 {
170 	this->looping = looping;
171 }
172 
isLooping() const173 bool Source::isLooping() const
174 {
175 	return looping;
176 }
177 
setMinVolume(float volume)178 void Source::setMinVolume(float volume)
179 {
180 	this->minVolume = volume;
181 }
182 
getMinVolume() const183 float Source::getMinVolume() const
184 {
185 	return this->minVolume;
186 }
187 
setMaxVolume(float volume)188 void Source::setMaxVolume(float volume)
189 {
190 	this->maxVolume = volume;
191 }
192 
getMaxVolume() const193 float Source::getMaxVolume() const
194 {
195 	return this->maxVolume;
196 }
197 
setReferenceDistance(float distance)198 void Source::setReferenceDistance(float distance)
199 {
200 	this->referenceDistance = distance;
201 }
202 
getReferenceDistance() const203 float Source::getReferenceDistance() const
204 {
205 	return this->referenceDistance;
206 }
207 
setRolloffFactor(float factor)208 void Source::setRolloffFactor(float factor)
209 {
210 	this->rolloffFactor = factor;
211 }
212 
getRolloffFactor() const213 float Source::getRolloffFactor() const
214 {
215 	return this->rolloffFactor;
216 }
217 
setMaxDistance(float distance)218 void Source::setMaxDistance(float distance)
219 {
220 	this->maxDistance = distance;
221 }
222 
getMaxDistance() const223 float Source::getMaxDistance() const
224 {
225 	return this->maxDistance;
226 }
227 
getChannels() const228 int Source::getChannels() const
229 {
230 	return 2;
231 }
232 
233 } // null
234 } // audio
235 } // love
236