From e4be73051a68b552c44280bbe9836dd4f02972d8 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 29 Nov 2024 20:35:17 +0100 Subject: audio system kinda working --- src/crepe/facade/SoundContext.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/crepe/facade/SoundContext.h') diff --git a/src/crepe/facade/SoundContext.h b/src/crepe/facade/SoundContext.h index 286ced8..e02977e 100644 --- a/src/crepe/facade/SoundContext.h +++ b/src/crepe/facade/SoundContext.h @@ -2,6 +2,8 @@ #include +#include "../api/Config.h" + #include "Sound.h" namespace crepe { @@ -22,9 +24,17 @@ public: SoundContext & operator=(const SoundContext &) = delete; SoundContext & operator=(SoundContext &&) = delete; + Sound::Handle play(Sound & resource); + void stop(Sound::Handle &); + void set_volume(Sound &, Sound::Handle &, float); + void set_loop(Sound &, Sound::Handle &, bool); + bool get_playing(Sound::Handle &); private: SoLoud::Soloud engine; + float default_volume = 1.0f; + + Config & config = Config::get_instance(); }; } // namespace crepe -- cgit v1.2.3