Zappy GUI
C++ graphic client: renderer, camera, network
Loading...
Searching...
No Matches
AAudioManager Class Referenceabstract

Abstract audio manager providing common event mapping logic. More...

#include <AAudioManager.hpp>

+ Inheritance diagram for AAudioManager:
+ Collaboration diagram for AAudioManager:

Public Member Functions

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
 
virtual void init ()=0
 Initializes the audio subsystem.
 
virtual void shutdown ()=0
 Cleans up audio resources and shuts down the subsystem.
 

Protected Member Functions

virtual void playSound (const std::string &key, const std::string &filepath)=0
 Plays a sound associated with a specific key.
 

Detailed Description

Abstract audio manager providing common event mapping logic.

Definition at line 11 of file AAudioManager.hpp.

Constructor & Destructor Documentation

◆ ~AAudioManager()

virtual AAudioManager::~AAudioManager ( )
virtualdefault

Member Function Documentation

◆ handleEvent()

void AAudioManager::handleEvent ( const Event event)
overridevirtual

Handles a game event to trigger the appropriate sound.

Parameters
eventThe game event to handle.

Implements IAudioManager.

Definition at line 6 of file AAudioManager.cpp.

References playSound().

+ Here is the call graph for this function:

◆ playSound()

virtual void AAudioManager::playSound ( const std::string &  key,
const std::string &  filepath 
)
protectedpure virtual

Plays a sound associated with a specific key.

Parameters
keyThe key identifying the sound to play.
filepathThe file path to the sound file.

Implemented in NullAudioManager, and RaylibAudioManager.

Referenced by handleEvent().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: