Slippers Engine
 
Loading...
Searching...
No Matches
SoundManager Class Reference

Singleton responisble for loading and retrieving Sounds. More...

#include <SoundManager.h>

Collaboration diagram for SoundManager:
Collaboration graph

Public Types

using MapKey = std::string
 KEYS stored as STRINGS.
 

Static Public Member Functions

static void LoadSoundMono (const MapKey &key, const std::string &path)
 Load Shader with KEY and FILE PATH.
 
static void LoadSoundStereo (const MapKey &key, const std::string &path)
 Load Shader with KEY and FILE PATH.
 
static Sound GetSoundMono (const MapKey &key)
 Returns Mono Sound with given KEY.
 
static Sound GetSoundStereo (const MapKey &key)
 Returns Stereo Sound with given KEY.
 

Detailed Description

Singleton responisble for loading and retrieving Sounds.

Member Typedef Documentation

◆ MapKey

using SoundManager::MapKey = std::string

KEYS stored as STRINGS.

Member Function Documentation

◆ GetSoundMono()

static Sound SoundManager::GetSoundMono ( const MapKey & key)
static

Returns Mono Sound with given KEY.

A function that returns a mono sound based on a user generated key. Checks if key already exists.

Warning
Certain Functions Require Mono Sounds Only
Parameters
key
Returns
Sound

◆ GetSoundStereo()

static Sound SoundManager::GetSoundStereo ( const MapKey & key)
static

Returns Stereo Sound with given KEY.

A function that returns a stereo sound based on a user generated key. Checks if key already exists.

Warning
Certain Functions Require Stereo Sounds Only
Parameters
key
Returns
Sound

◆ LoadSoundMono()

static void SoundManager::LoadSoundMono ( const MapKey & key,
const std::string & path )
static

Load Shader with KEY and FILE PATH.

A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as a file path for a mono sound existing in Assets/Shaders. Checks for repeated key use.

Warning
Will fail if sound is not mono.
Parameters
key
path

◆ LoadSoundStereo()

static void SoundManager::LoadSoundStereo ( const MapKey & key,
const std::string & path )
static

Load Shader with KEY and FILE PATH.

A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as a file path for a stereo sound existing in Assets/Shaders. Checks for repeated key use.

Warning
Will fail if sound is not stereo.
Parameters
key
path