CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::AudioAPISource Class Referenceabstract

A audio source is an entity that emits sounds. More...

#include <CeresEngine/Audio/API/Source.hpp>

Inheritance diagram for CeresEngine::AudioAPISource:
CeresEngine::RefCounted< AudioAPISource > CeresEngine::ALSource

Public Member Functions

 AudioAPISource ()=default
 The default constructor.
 
 AudioAPISource (const AudioAPISource &)=delete
 Deleted copy constructor.
 
AudioAPISourceoperator= (const AudioAPISource &)=delete
 Deleted copy assignment operator.
 
virtual ~AudioAPISource ()=default
 Destroys the audio source.
 
virtual void play ()=0
 Plays a audio buffer.
 
virtual bool isPlaying () const =0
 
virtual void stop ()=0
 Stops playing sound from the source.
 
virtual bool isStopped () const =0
 Checks if the audio source is already stopped.
 
virtual void pause ()=0
 Pauses the audio source.
 
virtual bool isPaused () const =0
 Checks if the audio source reproduction is paused.
 
virtual void resume ()=0
 Resumes playing audio tracks.
 
virtual void update (const AudioAPISourceDescriptor &descriptor)=0
 
- Public Member Functions inherited from CeresEngine::RefCounted< AudioAPISource >
 RefCounted (Args &&... args)
 Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it.
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Relases the object by decrementing it's reference count by one.
 

Detailed Description

A audio source is an entity that emits sounds.

A source can have several attributes set for it, including position, direction, velocity, gain, etc.

A source can only play a single audio resource at once. If a object must emmit two or more sounds at once, more sources must be created and attached to the object.

Constructor & Destructor Documentation

◆ AudioAPISource() [1/2]

CeresEngine::AudioAPISource::AudioAPISource ( )
default

The default constructor.

◆ AudioAPISource() [2/2]

CeresEngine::AudioAPISource::AudioAPISource ( const AudioAPISource )
delete

Deleted copy constructor.

◆ ~AudioAPISource()

virtual CeresEngine::AudioAPISource::~AudioAPISource ( )
virtualdefault

Destroys the audio source.

Member Function Documentation

◆ isPaused()

virtual bool CeresEngine::AudioAPISource::isPaused ( ) const
pure virtual

Checks if the audio source reproduction is paused.

Returns
True if the source reproduction is paused

Implemented in CeresEngine::ALSource.

◆ isPlaying()

virtual bool CeresEngine::AudioAPISource::isPlaying ( ) const
pure virtual
Returns
True if the source is busy playing a audio

Implemented in CeresEngine::ALSource.

◆ isStopped()

virtual bool CeresEngine::AudioAPISource::isStopped ( ) const
pure virtual

Checks if the audio source is already stopped.

Returns
True if the source is not playing anything

Implemented in CeresEngine::ALSource.

◆ operator=()

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

Deleted copy assignment operator.

◆ pause()

virtual void CeresEngine::AudioAPISource::pause ( )
pure virtual

Pauses the audio source.

Playback can be resumed from the same point with a call to resume().

Implemented in CeresEngine::ALSource.

◆ play()

virtual void CeresEngine::AudioAPISource::play ( )
pure virtual

Plays a audio buffer.

Implemented in CeresEngine::ALSource.

◆ resume()

virtual void CeresEngine::AudioAPISource::resume ( )
pure virtual

Resumes playing audio tracks.

Implemented in CeresEngine::ALSource.

◆ stop()

virtual void CeresEngine::AudioAPISource::stop ( )
pure virtual

Stops playing sound from the source.

If there is no sound being played, this method does nothing.

Implemented in CeresEngine::ALSource.

◆ update()

virtual void CeresEngine::AudioAPISource::update ( const AudioAPISourceDescriptor descriptor)
pure virtual

Implemented in CeresEngine::ALSource.


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