Interface for managing sound operations. More...
#include <isound_manager.h>
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. | |
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.
|
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.
|
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.
|
pure virtual |
Plays the background ambience music. This music typically loops and plays continuously unless overridden by table music.
path | The full path to the ambience music file. If empty, stops current ambience. |
Implemented in PulseAudioPlayer.
|
pure virtual |
Implemented in PulseAudioPlayer.
|
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.
path | The full path to the table music file. If empty, stops current table music. |
Implemented in PulseAudioPlayer.
|
pure virtual |
Plays a specific UI sound effect identified by its unique key. These sounds are typically short and can play concurrently with music.
key | The unique string identifier for the UI sound to be played. |
Implemented in PulseAudioPlayer.
|
pure virtual |
Stops any currently playing background music (ambience or table music).
Implemented in PulseAudioPlayer.
|
pure virtual |
Updates the internal settings and reloads sounds if necessary.
newSettings | The new settings to apply. |
Implemented in PulseAudioPlayer.