top of page

SoundManager

SoundManager Interface

The SoundManager class is responsible for calling the built in "SpawnSound..." functions, storing the returned AudioComponents, keeping track of sounds that should be single instance and keeping track of muted actors.

Looking at the implementations of PlaySound and StopSound we can see how the manager utilizes its mutelist to check if the actor is allowed to make any noise, tries to "early out" if the sound is not supposed to follow the parent actor and also keeps track of which sounds have the custom "OnLoopExit" node implemented in the MetaSound graph. These are good examples of why this manager need to exist; managing this functionality on multiple places would be a nightmare.

Implementation of PlaySound and StopSound

BP Soundmanager.png

Accessing the PlaySound function from a blueprint
Note: I'm using a statc helper function (Get Sound Manager Static) here to avoid getting the gameinstance, casting it to custom type and then finally getting the manager.

SoundTrackManager

Blueprint call to change the music intensity

In much the same way, the SoundTrackManager class is responsible for managing all soundtrack related audio, although much of the logic is hidden inside the MusicPlayer class.

SoundTrackManager functions

bottom of page