diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-29 16:23:52 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-29 16:23:52 +0100 |
commit | c59d460f12e1393e0ddbaaa1c6f5522eb12f8ff9 (patch) | |
tree | e7d7ceabbb5b538b8fc57704750ccae9135be735 /src/crepe/system/AudioSystem.h | |
parent | c2ef6a36532c8c078fd7836325d6be277b946cbf (diff) |
more utility classes for Audio system
Diffstat (limited to 'src/crepe/system/AudioSystem.h')
-rw-r--r-- | src/crepe/system/AudioSystem.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/crepe/system/AudioSystem.h b/src/crepe/system/AudioSystem.h index e037f51..7f41fda 100644 --- a/src/crepe/system/AudioSystem.h +++ b/src/crepe/system/AudioSystem.h @@ -1,6 +1,7 @@ #pragma once #include "../facade/SoundContext.h" +#include "../api/AudioSource.h" #include "System.h" @@ -12,6 +13,26 @@ public: void update() override; private: + /** + * \brief Private data stored by AudioSystem on AudioSource component + */ + struct ComponentPrivate { + //! This sample's voice handle + SoLoud::handle handle; + + //! Value of \c active after last system update + bool last_active = false; + //! Value of \c playing after last system update + bool last_playing = false; + //! Value of \c volume after last system update + float last_volume = 1.0; + //! Value of \c loop after last system update + bool last_loop = false; + }; + + void update_private(const AudioSource & component, ComponentPrivate & data); + +private: SoundContext context {}; }; |