Open Source Tomb Raider Engine
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Sound.h 964B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #include <string>
  10. class Sound {
  11. public:
  12. static int initialize();
  13. static void shutdown();
  14. static void clear();
  15. static int numBuffers();
  16. static int loadBuffer(unsigned char* buffer, unsigned int length);
  17. static int numSources(bool atListener = false);
  18. static int addSource(int buffer, float volume = 1.0f, bool atListener = false, bool loop = false);
  19. static int sourceAt(int source, glm::vec3 pos);
  20. static void listenAt(glm::vec3 pos, glm::vec3 at, glm::vec3 up);
  21. static void play(int source, bool atListener = false);
  22. static void stop(int source);
  23. static void stopAll();
  24. static void setEnabled(bool on = true);
  25. static bool getEnabled();
  26. static void setVolume(float vol = 1.0f);
  27. static float getVolume();
  28. static std::string getVersion(bool linked);
  29. };
  30. #endif