Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637
  1. /*!
  2. * \file include/system/Sound.h
  3. * \brief This is the audio manager Header
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SOUND_H_
  8. #define _SOUND_H_
  9. class Sound {
  10. public:
  11. static int initialize();
  12. static void shutdown();
  13. static void clear();
  14. static int numBuffers();
  15. static int loadBuffer(unsigned char* buffer, unsigned int length);
  16. static int numSources(bool atListener = false);
  17. static int addSource(int buffer, float volume = 1.0f, bool atListener = false, bool loop = false);
  18. static int sourceAt(int source, glm::vec3 pos);
  19. static void listenAt(glm::vec3 pos, glm::vec3 at, glm::vec3 up);
  20. static void play(int source, bool atListener = false);
  21. static void stopAll();
  22. static void setEnabled(bool on = true);
  23. static bool getEnabled();
  24. static void setVolume(float vol = 1.0f);
  25. static float getVolume();
  26. };
  27. #endif