9#include "../common/Logger/Logger.hpp"
30 LOG_ERROR(
"[SoundEffectManager] Failed to initialize audio device");
38 LOG_INFO(
"[SoundEffectManager] Initialized with volume: ",
static_cast<int>(
_volume * 100),
"%");
81 _volume = (volume < 0.0F) ? 0.0F : (volume > 1.0F) ? 1.0F : volume;
Graphics::IGraphics & _graphics
~SoundEffectManager() override
Destructor - unloads all sounds.
SoundEffectManager(Graphics::IGraphics &graphics)
Construct the sound effect manager.
void PlayRoomMenuOpenSound() override
Play the room menu open sound effect.
static constexpr const char * SOUND_ROOM_MENU_OPEN
void PlayClickSound() override
Play the button click sound effect.
static constexpr const char * SOUND_MAIN_MENU_OPEN
static constexpr const char * SOUND_CLICK
float GetVolume() const override
Get the current master volume.
void SetVolume(float volume) override
Set the master volume for all sound effects.
void ApplyVolumeToAllSounds()
bool Initialize()
Initialize the audio system and load all sounds.
static constexpr const char * PATH_ROOM_MENU_OPEN
static constexpr const char * PATH_MAIN_MENU_OPEN
void PlayMainMenuOpenSound() override
Play the main menu open sound effect.
static constexpr const char * PATH_CLICK
Abstract interface for graphics rendering operations.
virtual bool LoadSound(const char *soundName, const char *filepath)=0
Load a sound from file.
virtual void PlaySound(const char *soundName)=0
Play a loaded sound.
virtual void UnloadSound(const char *soundName)=0
Unload a previously loaded sound.
virtual bool IsAudioDeviceReady() const =0
Check if audio device is ready.
virtual void SetSoundVolume(const char *soundName, float volume)=0
Set volume for a specific sound.
virtual void InitAudioDevice()=0
Initialize the audio device.