Hymn to Beauty
C++ 3D Engine
SoundManager Class Reference

Handles sound. More...

#include <SoundManager.hpp>

Public Member Functions

void Update ()
 Moves sound sources and plays sounds. More...
 
Component::SoundSourceCreateSoundSource ()
 Create sound source component. More...
 
const std::vector< Component::SoundSource * > & GetSoundSources () const
 Get all sound source components. More...
 
Component::ListenerCreateListener ()
 Create listener component. More...
 
const std::vector< Component::Listener * > & GetListeners () const
 Get all listener components. More...
 
void ClearKilledComponents ()
 Remove all killed components. More...
 

Friends

class Hub
 

Detailed Description

Handles sound.

Member Function Documentation

◆ ClearKilledComponents()

void SoundManager::ClearKilledComponents ( )

Remove all killed components.

◆ CreateListener()

Component::Listener * SoundManager::CreateListener ( )

Create listener component.

Returns
The created component.

◆ CreateSoundSource()

Component::SoundSource * SoundManager::CreateSoundSource ( )

Create sound source component.

Returns
The created component.

◆ GetListeners()

const std::vector< Component::Listener * > & SoundManager::GetListeners ( ) const

Get all listener components.

Returns
All listener components.

◆ GetSoundSources()

const std::vector< Component::SoundSource * > & SoundManager::GetSoundSources ( ) const

Get all sound source components.

Returns
All sound source components.

◆ Update()

void SoundManager::Update ( )

Moves sound sources and plays sounds.

Todo:
Set velocity based on physics.
Todo:
More than one listener? Eg. for split-screen multiplayer.

Friends And Related Function Documentation

◆ Hub

friend class Hub
friend

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