X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Faudio%2FAudio.hpp;fp=src%2Faudio%2FAudio.hpp;h=bfd6d47594f4e81b175aa7a860269d51fb0439bd;hb=045a6ec084bf1fb4df3c6ade4a88932cf61bed23;hp=fe5364db45c787285ef53a8be42a2eeffa2a4c1d;hpb=5e8eee742138f2578e83e710ffc41408abd3073f;p=blank.git diff --git a/src/audio/Audio.hpp b/src/audio/Audio.hpp index fe5364d..bfd6d47 100644 --- a/src/audio/Audio.hpp +++ b/src/audio/Audio.hpp @@ -1,6 +1,8 @@ #ifndef BLANK_AUDIO_AUDIO_HPP_ #define BLANK_AUDIO_AUDIO_HPP_ +#include "../app/IntervalTimer.hpp" + #include #include @@ -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; };