Open Source Tomb Raider Engine
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*!
  2. * \file include/system/SoundAL.h
  3. * \brief OpenAL Sound Implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SOUND_AL_H_
  8. #define _SOUND_AL_H_
  9. #include <string>
  10. #include <vector>
  11. class SoundAL {
  12. public:
  13. static int initialize();
  14. static void shutdown();
  15. static void clear();
  16. static int numBuffers();
  17. static int loadBuffer(unsigned char* buffer, unsigned int length);
  18. static int numSources(bool atListener);
  19. static int addSource(int buffer, float vol, bool atListener, bool loop);
  20. static int sourceAt(int source, glm::vec3 pos);
  21. static void listenAt(glm::vec3 pos, glm::vec3 at, glm::vec3 up);
  22. static void play(int source, bool atListener);
  23. static void stop(int source);
  24. static void stopAll();
  25. static void setEnabled(bool on);
  26. static bool getEnabled();
  27. static void setVolume(float vol);
  28. static float getVolume();
  29. static std::string getVersion(bool linked);
  30. private:
  31. static bool init;
  32. static bool enabled;
  33. static float volume;
  34. static std::vector<unsigned int> buffers;
  35. static std::vector<unsigned int> sources;
  36. static std::vector<unsigned int> listenerSources;
  37. static glm::vec3 lastPosition;
  38. };
  39. #endif