Slippers Engine
 
Loading...
Searching...
No Matches
SoundSourceBase Class Referenceabstract

Responsible for Base of Sound Sources. Go To Scene for creation and destruction. More...

#include <SoundSourceBase.h>

Public Types

enum class  PlayState { PLAYING , PAUSED , STOPPED }
 Potential States a source can be in. More...
 

Public Member Functions

virtual bool GetLooping ()
 Returns if sound is looping.
 
virtual void SetLooping (bool l)
 Sets if sound is looping.
 
virtual float GetPitch ()
 Returns sound's pitch.
 
virtual void SetPitch (float p)
 Sets sound's pitch.
 
virtual float GetGain ()=0
 Returns sound's gain.
 
virtual void SetGain (float g)=0
 Sets sound's gain.
 
virtual float GetOffset ()
 Returns sound's offset.
 
virtual void SetOffset (float o)
 Sets sound's offset.
 
virtual PlayState GetPlayState ()
 Returns sound's PlayState.
 
virtual void SetSound (SoundManager::Sound s)=0
 Sets sound to be played.
 
virtual void Play ()
 Plays a sound starting at it's offset.
 
virtual void PlayStart ()
 Plays a sound starting at the beginning.
 
virtual void Pause ()
 Pauses a sound.
 
virtual void Stop ()
 Fully Stops a sound.
 

Detailed Description

Responsible for Base of Sound Sources. Go To Scene for creation and destruction.

Member Enumeration Documentation

◆ PlayState

enum class SoundSourceBase::PlayState
strong

Potential States a source can be in.

Enumerator
PLAYING 
PAUSED 
STOPPED 

Member Function Documentation

◆ GetGain()

virtual float SoundSourceBase::GetGain ( )
pure virtual

Returns sound's gain.

Called as expected. Differences internally for SoundSourceWorld and SoundSourceListener.

Returns
float

Implemented in SoundSourceListener, and SoundSourceWorld.

◆ GetLooping()

virtual bool SoundSourceBase::GetLooping ( )
virtual

Returns if sound is looping.

Returns
bool

◆ GetOffset()

virtual float SoundSourceBase::GetOffset ( )
virtual

Returns sound's offset.

Returns
float

◆ GetPitch()

virtual float SoundSourceBase::GetPitch ( )
virtual

Returns sound's pitch.

Returns
float

◆ GetPlayState()

virtual PlayState SoundSourceBase::GetPlayState ( )
virtual

Returns sound's PlayState.

Returns
PlayState

◆ Pause()

void SoundSourceBase::Pause ( )
virtual

Pauses a sound.

◆ Play()

void SoundSourceBase::Play ( )
virtual

Plays a sound starting at it's offset.

◆ PlayStart()

void SoundSourceBase::PlayStart ( )
virtual

Plays a sound starting at the beginning.

◆ SetGain()

virtual void SoundSourceBase::SetGain ( float g)
pure virtual

Sets sound's gain.

Called as expected. Differences internally for SoundSourceWorld and SoundSourceListener.

Parameters
g

Implemented in SoundSourceListener, and SoundSourceWorld.

◆ SetLooping()

virtual void SoundSourceBase::SetLooping ( bool l)
virtual

Sets if sound is looping.

Parameters
l

◆ SetOffset()

virtual void SoundSourceBase::SetOffset ( float o)
virtual

Sets sound's offset.

Parameters
o

◆ SetPitch()

virtual void SoundSourceBase::SetPitch ( float p)
virtual

Sets sound's pitch.

Parameters
p

◆ SetSound()

virtual void SoundSourceBase::SetSound ( SoundManager::Sound s)
pure virtual

Sets sound to be played.

Called as expected. SoundSourceWorld only accepts mono sounds. SoundSourceListener can accept either mono or stereo.

Parameters
s

Implemented in SoundSourceListener, and SoundSourceWorld.

◆ Stop()

void SoundSourceBase::Stop ( )
virtual

Fully Stops a sound.