SoundSystem.h 538 B

123456789101112131415161718192021222324252627282930313233
  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. void UnloadSound(unsigned int inID);
  21. private:
  22. ALCdevice* device;
  23. ALCcontext* context;
  24. std::vector<Sound*> sounds;
  25. };