]> git.localhorst.tv Git - blank.git/blobdiff - src/audio/Audio.hpp
centralize entity controllers
[blank.git] / src / audio / Audio.hpp
index fe5364db45c787285ef53a8be42a2eeffa2a4c1d..800e247c010ef770a1a998aae8abd969880dcbec 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef BLANK_AUDIO_AUDIO_HPP_
 #define BLANK_AUDIO_AUDIO_HPP_
 
+#include "../app/IntervalTimer.hpp"
+
 #include <al.h>
 #include <glm/glm.hpp>
 
@@ -32,9 +34,16 @@ public:
 
        void StopAll() noexcept;
 
+       void Update(int dt) noexcept;
+
+private:
+       int NextFree() noexcept;
+
 private:
-       static constexpr std::size_t NUM_SRC = 1;
+       static constexpr std::size_t NUM_SRC = 16;
        ALuint source[NUM_SRC];
+       CoarseTimer timer[NUM_SRC];
+       int last_free;
 
 };