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