X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Faudio%2FAudio.hpp;h=800e247c010ef770a1a998aae8abd969880dcbec;hb=ee3fee8a4bf3e77b17c940fb8f3daf30ede46cce;hp=fe5364db45c787285ef53a8be42a2eeffa2a4c1d;hpb=7c2a8b8285278b8a3077b311d82f05ea0463a96e;p=blank.git diff --git a/src/audio/Audio.hpp b/src/audio/Audio.hpp index fe5364d..800e247 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]; + CoarseTimer timer[NUM_SRC]; + int last_free; };