Audio.cpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /**
  2. * Copyright (c) 2006-2015 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. : distanceModel(DISTANCE_NONE)
  29. {
  30. }
  31. Audio::~Audio()
  32. {
  33. }
  34. const char *Audio::getName() const
  35. {
  36. return "love.audio.null";
  37. }
  38. love::audio::Source *Audio::newSource(love::sound::Decoder *)
  39. {
  40. return new Source();
  41. }
  42. love::audio::Source *Audio::newSource(love::sound::SoundData *)
  43. {
  44. return new Source();
  45. }
  46. int Audio::getSourceCount() const
  47. {
  48. return 0;
  49. }
  50. int Audio::getMaxSources() const
  51. {
  52. return 0;
  53. }
  54. bool Audio::play(love::audio::Source *)
  55. {
  56. return false;
  57. }
  58. void Audio::stop(love::audio::Source *)
  59. {
  60. }
  61. void Audio::stop()
  62. {
  63. }
  64. void Audio::pause(love::audio::Source *)
  65. {
  66. }
  67. void Audio::pause()
  68. {
  69. }
  70. void Audio::resume(love::audio::Source *)
  71. {
  72. }
  73. void Audio::resume()
  74. {
  75. }
  76. void Audio::rewind(love::audio::Source *)
  77. {
  78. }
  79. void Audio::rewind()
  80. {
  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. void Audio::record()
  116. {
  117. }
  118. love::sound::SoundData *Audio::getRecordedData()
  119. {
  120. return NULL;
  121. }
  122. love::sound::SoundData *Audio::stopRecording(bool)
  123. {
  124. return NULL;
  125. }
  126. bool Audio::canRecord()
  127. {
  128. return false;
  129. }
  130. Audio::DistanceModel Audio::getDistanceModel() const
  131. {
  132. return this->distanceModel;
  133. }
  134. void Audio::setDistanceModel(DistanceModel distanceModel)
  135. {
  136. this->distanceModel = distanceModel;
  137. }
  138. } // null
  139. } // audio
  140. } // love