#ifndef _H_SOUNDMANAGER_H #define _H_SOUNDMANAGER_H #include #include #include class SoundManager { public: SoundManager(); void playSound(ALuint buffer, int priority=10, const glm::vec3& pos = glm::vec3(0)); void pollSources(); ~SoundManager(); private: struct AudioSource { ALuint source; bool inUse; int priority; }; std::array sources; std::size_t lastUsed = 0; }; #endif // _H_SOUNDMANAGER_H