CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::AudioSystem Class Referencefinal

A system that implements audio playback. More...

#include <CeresEngine/Audio/AudioSystem.hpp>

Inheritance diagram for CeresEngine::AudioSystem:
CeresEngine::System< AudioSystem, EntityObjectSet< AudioListener, AudioSource >, ComponentSet<>, EntityActionSet< Play > >

Public Member Functions

 AudioSystem (const AudioAPI &renderer)
 Creates a new audio system.
 
 AudioSystem (const AudioSystem &)=delete
 
AudioSystemoperator= (const AudioSystem &)=delete
 
void update (double time) override
 
void act (Entity &entity, const Play &action) final
 

Private Member Functions

void didAdd (const AudioListener &entity) noexcept final
 A notification dispatched by the SystemManager to a system.
 
void didRemove (const AudioListener &entity) noexcept final
 A notification dispatched by the SystemManager to a system.
 
void didAdd (const AudioSource &entity) noexcept final
 A notification dispatched by the SystemManager to a system.
 
void didRemove (const AudioSource &entity) noexcept final
 A notification dispatched by the SystemManager to a system.
 

Private Attributes

AudioAPIDevicePtr device
 The audio renderer system to be used when producing 3D audio.
 
AudioAPIListenerPtr listener
 The renderer default audio listener.
 

Detailed Description

A system that implements audio playback.

Constructor & Destructor Documentation

◆ AudioSystem() [1/2]

CeresEngine::AudioSystem::AudioSystem ( const AudioAPI renderer)
explicit

Creates a new audio system.

Parameters
rendererThe audio renderer system to be used when producing 3D audio

◆ AudioSystem() [2/2]

CeresEngine::AudioSystem::AudioSystem ( const AudioSystem )
delete

Member Function Documentation

◆ act()

void CeresEngine::AudioSystem::act ( Entity entity,
const Play action 
)
final

◆ didAdd() [1/2]

void CeresEngine::AudioSystem::didAdd ( const AudioListener entity)
finalprivatenoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once a new entity matching the EO criteria is created (either by creating it or by adding all components required).

Parameters
entityThe entity object.

◆ didAdd() [2/2]

void CeresEngine::AudioSystem::didAdd ( const AudioSource entity)
finalprivatenoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once a new entity matching the EO criteria is created (either by creating it or by adding all components required).

Parameters
entityThe entity object.

◆ didRemove() [1/2]

void CeresEngine::AudioSystem::didRemove ( const AudioListener entity)
finalprivatenoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once an entity that previously matched the EO criteria is destroyed (either by destroying it or by removing one of the required components).

Parameters
entityThe entity object.

◆ didRemove() [2/2]

void CeresEngine::AudioSystem::didRemove ( const AudioSource entity)
finalprivatenoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once an entity that previously matched the EO criteria is destroyed (either by destroying it or by removing one of the required components).

Parameters
entityThe entity object.

◆ operator=()

AudioSystem & CeresEngine::AudioSystem::operator= ( const AudioSystem )
delete

◆ update()

void CeresEngine::AudioSystem::update ( double  time)
override

Member Data Documentation

◆ device

AudioAPIDevicePtr CeresEngine::AudioSystem::device
private

The audio renderer system to be used when producing 3D audio.

◆ listener

AudioAPIListenerPtr CeresEngine::AudioSystem::listener
private

The renderer default audio listener.


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