Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

SoundNull.cpp 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*!
  2. * \file src/SoundNull.cpp
  3. * \brief This is the null audio manager Implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #include "global.h"
  8. #include "SoundNull.h"
  9. SoundNull::SoundNull() {
  10. sources = 0;
  11. }
  12. SoundNull::~SoundNull() {
  13. }
  14. int SoundNull::initialize() {
  15. return 0;
  16. }
  17. void SoundNull::setEnabled(bool on) {
  18. }
  19. void SoundNull::setVolume(float vol) {
  20. }
  21. unsigned long SoundNull::registeredSources() {
  22. return sources;
  23. }
  24. void SoundNull::clear() {
  25. sources = 0;
  26. }
  27. void SoundNull::listenAt(float pos[3], float angle[3]) {
  28. }
  29. void SoundNull::sourceAt(unsigned long source, float pos[3]) {
  30. assert(source < sources);
  31. }
  32. int SoundNull::addFile(const char *filename, unsigned long *source, unsigned int flags) {
  33. *source = sources;
  34. sources++;
  35. return 0;
  36. }
  37. int SoundNull::addWave(unsigned char *wav, unsigned int length, unsigned long *source, unsigned int flags) {
  38. *source = sources;
  39. sources++;
  40. return 0;
  41. }
  42. void SoundNull::play(unsigned long source) {
  43. assert(source < sources);
  44. }
  45. void SoundNull::stop(unsigned long source) {
  46. assert(source < sources);
  47. }