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.

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * \file include/system/Sound.h
  3. * \brief Sound Interface
  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 stop(int source);
  22. static void stopAll();
  23. static void setEnabled(bool on = true);
  24. static bool getEnabled();
  25. static void setVolume(float vol = 1.0f);
  26. static float getVolume();
  27. };
  28. #endif