Source.cpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /**
  2. * Copyright (c) 2006-2011 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 "Source.h"
  21. namespace love
  22. {
  23. namespace audio
  24. {
  25. namespace null
  26. {
  27. Source::Source()
  28. : love::audio::Source(Source::TYPE_STATIC)
  29. {
  30. }
  31. Source::~Source()
  32. {
  33. }
  34. love::audio::Source * Source::copy()
  35. {
  36. this->retain();
  37. return this;
  38. }
  39. void Source::play()
  40. {
  41. }
  42. void Source::stop()
  43. {
  44. }
  45. void Source::pause()
  46. {
  47. }
  48. void Source::resume()
  49. {
  50. }
  51. void Source::rewind()
  52. {
  53. }
  54. bool Source::isStopped() const
  55. {
  56. return true;
  57. }
  58. bool Source::isPaused() const
  59. {
  60. return false;
  61. }
  62. bool Source::isFinished() const
  63. {
  64. return true;
  65. }
  66. void Source::update()
  67. {
  68. }
  69. void Source::setPitch(float pitch)
  70. {
  71. this->pitch = pitch;
  72. }
  73. float Source::getPitch() const
  74. {
  75. return pitch;
  76. }
  77. void Source::setVolume(float volume)
  78. {
  79. this->volume = volume;
  80. }
  81. float Source::getVolume() const
  82. {
  83. return volume;
  84. }
  85. void Source::seek(float, Source::Unit)
  86. {
  87. }
  88. float Source::tell(Source::Unit)
  89. {
  90. return 0.0f;
  91. }
  92. void Source::setPosition(float *)
  93. {
  94. }
  95. void Source::getPosition(float *) const
  96. {
  97. }
  98. void Source::setVelocity(float *)
  99. {
  100. }
  101. void Source::getVelocity(float *) const
  102. {
  103. }
  104. void Source::setDirection(float *)
  105. {
  106. }
  107. void Source::getDirection(float *) const
  108. {
  109. }
  110. void Source::setLooping(bool looping)
  111. {
  112. this->looping = looping;
  113. }
  114. bool Source::isLooping() const
  115. {
  116. return looping;
  117. }
  118. bool Source::isStatic() const
  119. {
  120. return (type == TYPE_STATIC);
  121. }
  122. } // null
  123. } // audio
  124. } // love