Audio.cpp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /**
  2. * Copyright (c) 2006-2024 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. #include "Audio.h"
  21. namespace love
  22. {
  23. namespace audio
  24. {
  25. namespace null
  26. {
  27. Audio::Audio()
  28. : love::audio::Audio("love.audio.null")
  29. , distanceModel(DISTANCE_NONE)
  30. {
  31. }
  32. Audio::~Audio()
  33. {
  34. }
  35. love::audio::Source *Audio::newSource(love::sound::Decoder *)
  36. {
  37. return new Source();
  38. }
  39. love::audio::Source *Audio::newSource(love::sound::SoundData *)
  40. {
  41. return new Source();
  42. }
  43. love::audio::Source *Audio::newSource(int, int, int, int)
  44. {
  45. return new Source();
  46. }
  47. int Audio::getActiveSourceCount() const
  48. {
  49. return 0;
  50. }
  51. int Audio::getMaxSources() const
  52. {
  53. return 0;
  54. }
  55. bool Audio::play(love::audio::Source *)
  56. {
  57. return false;
  58. }
  59. bool Audio::play(const std::vector<love::audio::Source*>&)
  60. {
  61. return false;
  62. }
  63. void Audio::stop(love::audio::Source *)
  64. {
  65. }
  66. void Audio::stop(const std::vector<love::audio::Source*>&)
  67. {
  68. }
  69. void Audio::stop()
  70. {
  71. }
  72. void Audio::pause(love::audio::Source *)
  73. {
  74. }
  75. void Audio::pause(const std::vector<love::audio::Source*>&)
  76. {
  77. }
  78. std::vector<love::audio::Source*> Audio::pause()
  79. {
  80. return {};
  81. }
  82. void Audio::setVolume(float volume)
  83. {
  84. this->volume = volume;
  85. }
  86. float Audio::getVolume() const
  87. {
  88. return volume;
  89. }
  90. void Audio::getPosition(float *) const
  91. {
  92. }
  93. void Audio::setPosition(float *)
  94. {
  95. }
  96. void Audio::getOrientation(float *) const
  97. {
  98. }
  99. void Audio::setOrientation(float *)
  100. {
  101. }
  102. void Audio::getVelocity(float *) const
  103. {
  104. }
  105. void Audio::setVelocity(float *)
  106. {
  107. }
  108. void Audio::setDopplerScale(float)
  109. {
  110. }
  111. float Audio::getDopplerScale() const
  112. {
  113. return 1.0f;
  114. }
  115. /*
  116. void setMeter(float)
  117. {
  118. }
  119. float getMeter() const
  120. {
  121. return 1.0f;
  122. }
  123. */
  124. const std::vector<love::audio::RecordingDevice*> &Audio::getRecordingDevices()
  125. {
  126. return capture;
  127. }
  128. Audio::DistanceModel Audio::getDistanceModel() const
  129. {
  130. return this->distanceModel;
  131. }
  132. void Audio::setDistanceModel(DistanceModel distanceModel)
  133. {
  134. this->distanceModel = distanceModel;
  135. }
  136. bool Audio::setEffect(const char *, std::map<Effect::Parameter, float> &)
  137. {
  138. return false;
  139. }
  140. bool Audio::unsetEffect(const char *)
  141. {
  142. return false;
  143. }
  144. bool Audio::getEffect(const char *, std::map<Effect::Parameter, float> &)
  145. {
  146. return false;
  147. }
  148. bool Audio::getActiveEffects(std::vector<std::string> &) const
  149. {
  150. return false;
  151. }
  152. int Audio::getMaxSceneEffects() const
  153. {
  154. return 0;
  155. }
  156. int Audio::getMaxSourceEffects() const
  157. {
  158. return 0;
  159. }
  160. bool Audio::isEFXsupported() const
  161. {
  162. return false;
  163. }
  164. bool Audio::setOutputSpatialization(bool, const char *)
  165. {
  166. return false;
  167. }
  168. bool Audio::getOutputSpatialization(const char *&filter) const
  169. {
  170. filter = nullptr;
  171. return false;
  172. }
  173. void Audio::getOutputSpatializationFilters(std::vector<std::string> &) const
  174. {
  175. }
  176. void Audio::pauseContext()
  177. {
  178. }
  179. void Audio::resumeContext()
  180. {
  181. }
  182. std::string Audio::getPlaybackDevice()
  183. {
  184. return "";
  185. }
  186. void Audio::getPlaybackDevices(std::vector<std::string> &/*list*/)
  187. {
  188. }
  189. } // null
  190. } // audio
  191. } // love