Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::AudioPlayer Class Referenceabstract

#include <aurore/core/audio.hpp>

Inheritance diagram for aurore::AudioPlayer:
aurore::NullAudioPlayer

Public Member Functions

virtual ~AudioPlayer ()
 
virtual bool load (enum Sound sound)=0
 
virtual bool play (enum Sound sound, float pitch=1)=0
 

Constructor & Destructor Documentation

◆ ~AudioPlayer()

virtual aurore::AudioPlayer::~AudioPlayer ( )
inlinevirtual

Member Function Documentation

◆ load()

virtual bool aurore::AudioPlayer::load ( enum Sound  sound)
pure virtual

Preemptively loads the given sound so that it's ready to be played when needed.

Returns a boolean indicating if the sound has been loaded or not.

Implemented in aurore::NullAudioPlayer.

◆ play()

virtual bool aurore::AudioPlayer::play ( enum Sound  sound,
float  pitch = 1 
)
pure virtual

Plays the given sound.

The AudioPlayer should not assume that the sound has been loaded already, and must load it if needed.

Returns a boolean indicating if the sound has been played or not.

Implemented in aurore::NullAudioPlayer.


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