Open Source Tomb Raider Engine
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

SoundAL.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*!
  2. * \file include/system/SoundAL.h
  3. * \brief This is the OpenAL audio manager Header
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SOUND_AL_H_
  8. #define _SOUND_AL_H_
  9. #include <vector>
  10. class SoundAL {
  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);
  18. static int addSource(int buffer, float volume, bool atListener, bool loop);
  19. static int sourceAt(int source, float pos[3]);
  20. static void listenAt(float pos[3], float orientation[6]);
  21. static void play(int source, bool atListener);
  22. static void stopAll();
  23. static void setEnabled(bool on);
  24. static bool getEnabled();
  25. static void setVolume(float vol);
  26. static float getVolume();
  27. private:
  28. static bool init;
  29. static bool enabled;
  30. static float volume;
  31. static std::vector<unsigned int> buffers;
  32. static std::vector<unsigned int> sources;
  33. static std::vector<unsigned int> listenerSources;
  34. static float lastPosition[3];
  35. };
  36. #endif