From 43394c8a8908442982e3a7e25975c31b3c952923 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Sun, 27 Oct 2024 12:52:55 +0200 Subject: root --- graphics/AudioManager.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 graphics/AudioManager.h (limited to 'graphics/AudioManager.h') diff --git a/graphics/AudioManager.h b/graphics/AudioManager.h new file mode 100644 index 0000000..f323cc7 --- /dev/null +++ b/graphics/AudioManager.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include +#include + +class AudioManager +{ + std::unordered_map sounds; + std::unordered_map scores; + bool initialized = true; +public: + void playSound(std::string soundfile, float volume, bool looping = false); + void playMusic(std::string soundfile, float volume, bool looping = true, int fade_time = 0); + void stopMusic(int fade_time = 0); + AudioManager(); + ~AudioManager(); + +}; \ No newline at end of file -- cgit v1.2.3