nullAudioSound.cxx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file nullAudioSound.cxx
  10. * @author skyler
  11. * @date 2001-06-06
  12. * Prior system by: cary
  13. */
  14. #include "nullAudioSound.h"
  15. using std::string;
  16. TypeHandle NullAudioSound::_type_handle;
  17. namespace {
  18. static const string blank="";
  19. // static PN_stdfloat no_attributes [] = {0.0f,0.0f,0.0f, 0.0f,0.0f,0.0f};
  20. }
  21. /**
  22. * All of these functions are just stubs.
  23. */
  24. NullAudioSound::NullAudioSound() {
  25. // Intentionally blank.
  26. }
  27. NullAudioSound::~NullAudioSound() {
  28. // Intentionally blank.
  29. }
  30. void NullAudioSound::play() {
  31. // Intentionally blank.
  32. }
  33. void NullAudioSound::stop() {
  34. // Intentionally blank.
  35. }
  36. void NullAudioSound::set_loop(bool) {
  37. // Intentionally blank.
  38. }
  39. bool NullAudioSound::get_loop() const {
  40. return false;
  41. }
  42. void NullAudioSound::set_loop_count(unsigned long) {
  43. // Intentionally blank.
  44. }
  45. unsigned long NullAudioSound::get_loop_count() const {
  46. return 0;
  47. }
  48. void NullAudioSound::set_time(PN_stdfloat) {
  49. // Intentionally blank.
  50. }
  51. PN_stdfloat NullAudioSound::get_time() const {
  52. return 0;
  53. }
  54. void NullAudioSound::set_volume(PN_stdfloat) {
  55. // Intentionally blank.
  56. }
  57. PN_stdfloat NullAudioSound::get_volume() const {
  58. return 0;
  59. }
  60. void NullAudioSound::set_balance(PN_stdfloat) {
  61. // Intentionally blank.
  62. }
  63. PN_stdfloat NullAudioSound::get_balance() const {
  64. return 0;
  65. }
  66. void NullAudioSound::set_play_rate(PN_stdfloat) {
  67. // Intentionally blank.
  68. }
  69. PN_stdfloat NullAudioSound::get_play_rate() const {
  70. return 0;
  71. }
  72. void NullAudioSound::set_active(bool) {
  73. // Intentionally blank.
  74. }
  75. bool NullAudioSound::get_active() const {
  76. return false;
  77. }
  78. void NullAudioSound::set_finished_event(const string& event) {
  79. // Intentionally blank.
  80. }
  81. const string& NullAudioSound::get_finished_event() const {
  82. return blank;
  83. }
  84. const string& NullAudioSound::get_name() const {
  85. return blank;
  86. }
  87. PN_stdfloat NullAudioSound::length() const {
  88. return 0;
  89. }
  90. void NullAudioSound::set_3d_attributes(PN_stdfloat px, PN_stdfloat py, PN_stdfloat pz, PN_stdfloat vx, PN_stdfloat vy, PN_stdfloat vz) {
  91. // Intentionally blank.
  92. }
  93. void NullAudioSound::get_3d_attributes(PN_stdfloat *px, PN_stdfloat *py, PN_stdfloat *pz, PN_stdfloat *vx, PN_stdfloat *vy, PN_stdfloat *vz) {
  94. // Intentionally blank.
  95. }
  96. void NullAudioSound::set_3d_min_distance(PN_stdfloat dist) {
  97. // Intentionally blank.
  98. }
  99. PN_stdfloat NullAudioSound::get_3d_min_distance() const {
  100. // Intentionally blank.
  101. return 0.0f;
  102. }
  103. void NullAudioSound::set_3d_max_distance(PN_stdfloat dist) {
  104. // Intentionally blank.
  105. }
  106. PN_stdfloat NullAudioSound::get_3d_max_distance() const {
  107. // Intentionally blank.
  108. return 0.0f;
  109. }
  110. AudioSound::SoundStatus NullAudioSound::status() const {
  111. return AudioSound::READY;
  112. }