|
Zappy GUI
C++ graphic client: renderer, camera, network
|
Raylib audio manager implementation. More...
#include <RaylibAudioManager.hpp>
Inheritance diagram for RaylibAudioManager:
Collaboration diagram for RaylibAudioManager:Public Member Functions | |
| ~RaylibAudioManager () override=default | |
| void | init () override |
| Initializes the Raylib audio device. | |
| void | shutdown () override |
| Unloads all cached sounds and closes the Raylib audio device. | |
Public Member Functions inherited from AAudioManager | |
| virtual | ~AAudioManager ()=default |
| void | handleEvent (const Event &event) override |
| Handles a game event to trigger the appropriate sound. | |
Public Member Functions inherited from IAudioManager | |
| virtual | ~IAudioManager ()=default |
Protected Member Functions | |
| void | playSound (const std::string &key, const std::string &filepath) override |
| Loads the sound if not cached, then plays it via Raylib. | |
Private Attributes | |
| std::unordered_map< std::string, Sound > | _sounds |
| Caches loaded sounds to avoid reloading them. | |
Raylib audio manager implementation.
Definition at line 13 of file RaylibAudioManager.hpp.
|
overridedefault |
|
overridevirtual |
Initializes the Raylib audio device.
Implements IAudioManager.
Definition at line 3 of file RaylibAudioManager.cpp.
|
overrideprotectedvirtual |
Loads the sound if not cached, then plays it via Raylib.
Implements AAudioManager.
Definition at line 12 of file RaylibAudioManager.cpp.
References _sounds.
|
overridevirtual |
Unloads all cached sounds and closes the Raylib audio device.
Implements IAudioManager.
Definition at line 5 of file RaylibAudioManager.cpp.
References _sounds.
|
private |
Caches loaded sounds to avoid reloading them.
Definition at line 29 of file RaylibAudioManager.hpp.
Referenced by playSound(), and shutdown().