diff options
Diffstat (limited to 'src/crepe/facade/SoundContext.h')
-rw-r--r-- | src/crepe/facade/SoundContext.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/crepe/facade/SoundContext.h b/src/crepe/facade/SoundContext.h index d703c16..c651cd5 100644 --- a/src/crepe/facade/SoundContext.h +++ b/src/crepe/facade/SoundContext.h @@ -2,6 +2,8 @@ #include <soloud/soloud.h> +#include "../api/Config.h" + #include "Sound.h" namespace crepe { @@ -13,19 +15,25 @@ namespace crepe { * the methods for playing \c Sound instances. It is part of the sound facade. */ class SoundContext { -private: - // singleton +public: SoundContext(); virtual ~SoundContext(); + SoundContext(const SoundContext &) = delete; SoundContext(SoundContext &&) = delete; SoundContext & operator=(const SoundContext &) = delete; SoundContext & operator=(SoundContext &&) = delete; + virtual Sound::Handle play(Sound & resource); + virtual void stop(Sound::Handle &); + virtual void set_volume(Sound &, Sound::Handle &, float); + virtual void set_loop(Sound &, Sound::Handle &, bool); + private: - static SoundContext & get_instance(); SoLoud::Soloud engine; - friend class Sound; + float default_volume = 1.0f; + + Config & config = Config::get_instance(); }; } // namespace crepe |