]> git.localhorst.tv Git - blank.git/blobdiff - src/audio/Audio.hpp
the sound thing
[blank.git] / src / audio / Audio.hpp
index fe5364db45c787285ef53a8be42a2eeffa2a4c1d..bfd6d47594f4e81b175aa7a860269d51fb0439bd 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];
+       IntervalTimer timer[NUM_SRC];
+       int last_free;
 
 };