3#include "Logger/Logger.hpp"
4#include "components/SoundRequest.hpp"
5#include "systems/AudioManagerConcept.hpp"
8namespace rtk::systems {
18template <ecs::concepts::IsAudioManager AudioType>
21 AudioType &_audioManager;
28 AudioSystem(AudioType &audioManager) : _audioManager(audioManager) {}
34 void onStart(rtk::ecs::Registry &)
override { LOG_INFO(
"Load Audio System"); }
39 void update(rtk::ecs::Registry ®,
float)
override {
40 _audioManager.update();
46 void onStop(rtk::ecs::Registry &)
override {}
Ticks the audio backend once per frame.
Definition AudioSystem.hpp:19
void update(rtk::ecs::Registry ®, float) override
Calls update() on the backend.
Definition AudioSystem.hpp:39
AudioSystem(AudioType &audioManager)
Creates the system.
Definition AudioSystem.hpp:28
void onStop(rtk::ecs::Registry &) override
Does nothing.
Definition AudioSystem.hpp:46
void onStart(rtk::ecs::Registry &) override
Logs that the system is loaded.
Definition AudioSystem.hpp:34