ASAPCabinetFE
 
Loading...
Searching...
No Matches
ISoundManager Class Referenceabstract

Interface for managing sound operations. More...

#include <isound_manager.h>

+ Inheritance diagram for ISoundManager:
+ Collaboration diagram for ISoundManager:

Public Member Functions

virtual ~ISoundManager ()=default
 Virtual destructor to ensure proper cleanup for derived classes.
 
virtual void loadSounds ()=0
 Loads all necessary sound resources for the application.
 
virtual void playUISound (const std::string &key)=0
 Plays a specific UI sound effect identified by its unique key. These sounds are typically short and can play concurrently with music.
 
virtual void playAmbienceMusic (const std::string &path)=0
 Plays the background ambience music. This music typically loops and plays continuously unless overridden by table music.
 
virtual void playTableMusic (const std::string &path)=0
 Plays the table-specific music. This music typically loops and will stop any currently playing ambience music. If the path is empty or invalid, it will attempt to resume ambience music.
 
virtual void playCustomLaunch (const std::string &path)=0
 
virtual void stopMusic ()=0
 Stops any currently playing background music (ambience or table music).
 
virtual void applyAudioSettings ()=0
 Applies the current audio settings (volumes, mute states) to all active sound types. This should be called after settings are updated or on initialization.
 
virtual void updateSettings (const Settings &newSettings)=0
 Updates the internal settings and reloads sounds if necessary.
 

Detailed Description

Interface for managing sound operations.

Interface for sound management (forward declaration).

The ISoundManager class provides an abstract interface for loading and playing sounds within the application. It distinguishes between UI sound effects (Mix_Chunk), background ambience music (Mix_Music), and table-specific music (Mix_Music), providing methods for each.

Member Function Documentation

◆ applyAudioSettings()

virtual void ISoundManager::applyAudioSettings ( )
pure virtual

Applies the current audio settings (volumes, mute states) to all active sound types. This should be called after settings are updated or on initialization.

Implemented in PulseAudioPlayer.

◆ loadSounds()

virtual void ISoundManager::loadSounds ( )
pure virtual

Loads all necessary sound resources for the application.

This method is typically called once during application initialization and when sound-related settings change.

Implemented in PulseAudioPlayer.

◆ playAmbienceMusic()

virtual void ISoundManager::playAmbienceMusic ( const std::string &  path)
pure virtual

Plays the background ambience music. This music typically loops and plays continuously unless overridden by table music.

Parameters
pathThe full path to the ambience music file. If empty, stops current ambience.

Implemented in PulseAudioPlayer.

◆ playCustomLaunch()

virtual void ISoundManager::playCustomLaunch ( const std::string &  path)
pure virtual

Implemented in PulseAudioPlayer.

◆ playTableMusic()

virtual void ISoundManager::playTableMusic ( const std::string &  path)
pure virtual

Plays the table-specific music. This music typically loops and will stop any currently playing ambience music. If the path is empty or invalid, it will attempt to resume ambience music.

Parameters
pathThe full path to the table music file. If empty, stops current table music.

Implemented in PulseAudioPlayer.

+ Here is the caller graph for this function:

◆ playUISound()

virtual void ISoundManager::playUISound ( const std::string &  key)
pure virtual

Plays a specific UI sound effect identified by its unique key. These sounds are typically short and can play concurrently with music.

Parameters
keyThe unique string identifier for the UI sound to be played.

Implemented in PulseAudioPlayer.

+ Here is the caller graph for this function:

◆ stopMusic()

virtual void ISoundManager::stopMusic ( )
pure virtual

Stops any currently playing background music (ambience or table music).

Implemented in PulseAudioPlayer.

+ Here is the caller graph for this function:

◆ updateSettings()

virtual void ISoundManager::updateSettings ( const Settings newSettings)
pure virtual

Updates the internal settings and reloads sounds if necessary.

Parameters
newSettingsThe new settings to apply.

Implemented in PulseAudioPlayer.

+ Here is the caller graph for this function:

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