SoundSystem.h 500 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <vector>
  3. #ifdef WIN32
  4. #include <al.h>
  5. #include <alc.h>
  6. #else
  7. #include <AL/al.h>
  8. #include <AL/alc.h>
  9. #endif
  10. #include "Vector.h"
  11. #include "Sound.h"
  12. class SoundSystem
  13. {
  14. public:
  15. SoundSystem();
  16. ~SoundSystem();
  17. void SetListener(const Vec3f& inPos, const Vec3f& inVel, const Vec3f& inOri);
  18. unsigned int LoadSound(const char* inWavPath, bool inLooping);
  19. Sound* GetSound(unsigned int inID);
  20. private:
  21. ALCdevice* device;
  22. ALCcontext* context;
  23. std::vector<Sound*> sounds;
  24. };