High-level sound manager that wraps around an IAudioSystem. Provides functionality for loading, playing, and stopping sounds.
More...
#include <Sound_manager.hpp>
High-level sound manager that wraps around an IAudioSystem. Provides functionality for loading, playing, and stopping sounds.
◆ SoundManager()
| EI::SoundManager::SoundManager |
( |
| ) |
|
◆ ~SoundManager()
| EI::SoundManager::~SoundManager |
( |
| ) |
|
Destructor, shuts down audio system if necessary.
◆ Init()
| bool EI::SoundManager::Init |
( |
| ) |
|
Initializes the underlying audio system.
- Returns
- True if initialization succeeded
◆ LoadSound()
Loads a sound file into memory and returns a handle.
- Parameters
-
| path | Path to the sound file |
| desc | Optional sound description |
- Returns
- SoundHandle to the loaded sound
◆ Play()
Plays a sound with the given parameters.
- Parameters
-
| sound | Handle of the sound to play |
| params | Optional playback parameters |
- Returns
- VoiceHandle representing the playing instance
◆ SetMasterVolume()
| void EI::SoundManager::SetMasterVolume |
( |
float | volume | ) |
|
Sets the global/master volume of the audio system.
- Parameters
-
| volume | Volume value (0.0f = silent, 1.0f = full) |
◆ Shutdown()
| void EI::SoundManager::Shutdown |
( |
| ) |
|
Shuts down the audio system and releases resources.
◆ Stop()
Stops a currently playing voice.
- Parameters
-
| voice | Handle of the voice to stop |
◆ UnloadSound()
| void EI::SoundManager::UnloadSound |
( |
SoundHandle | sound | ) |
|
Unloads a previously loaded sound.
- Parameters
-
| sound | Handle of the sound to unload |
◆ Update()
| void EI::SoundManager::Update |
( |
float | dt | ) |
|
Updates the audio system (call once per frame).
- Parameters
-
The documentation for this class was generated from the following file: