Overload  1.1
Game engine with editor
Public Member Functions | Static Public Attributes | List of all members
OvAudio::Entities::AudioSource Class Reference

#include <AudioSource.h>

Public Member Functions

 AudioSource (Core::AudioPlayer &p_audioPlayer)
 
 AudioSource (Core::AudioPlayer &p_audioPlayer, OvMaths::FTransform &p_transform)
 
 ~AudioSource ()
 
void UpdateTrackedSoundPosition ()
 
void ApplySourceSettingsToTrackedSound ()
 
bool IsTrackingSound () const
 
Tracking::SoundTrackerGetTrackedSound () const
 
void SetVolume (float p_volume)
 
void SetPan (float p_pan)
 
void SetLooped (bool p_looped)
 
void SetPitch (float p_pitch)
 
void SetSpatial (bool p_value)
 
void SetAttenuationThreshold (float p_distance)
 
float GetVolume () const
 
float GetPan () const
 
bool IsLooped () const
 
float GetPitch () const
 
bool IsFinished () const
 
bool IsSpatial () const
 
float GetAttenuationThreshold () const
 
void Play (const Resources::Sound &p_sound)
 
void Resume ()
 
void Pause ()
 
void Stop ()
 
void StopAndDestroyTrackedSound ()
 

Static Public Attributes

static OvTools::Eventing::Event< AudioSource & > CreatedEvent
 
static OvTools::Eventing::Event< AudioSource & > DestroyedEvent
 

Detailed Description

Wrap Irrklang ISound

Constructor & Destructor Documentation

◆ AudioSource() [1/2]

OvAudio::Entities::AudioSource::AudioSource ( Core::AudioPlayer p_audioPlayer)

AudioSource constructor (Internal transform management)

Parameters
p_audioPlayer

◆ AudioSource() [2/2]

OvAudio::Entities::AudioSource::AudioSource ( Core::AudioPlayer p_audioPlayer,
OvMaths::FTransform p_transform 
)

AudioSource constructor (External transform management)

Parameters
p_audioPlayer
p_transform

◆ ~AudioSource()

OvAudio::Entities::AudioSource::~AudioSource ( )

AudioSource destructor

Member Function Documentation

◆ ApplySourceSettingsToTrackedSound()

void OvAudio::Entities::AudioSource::ApplySourceSettingsToTrackedSound ( )

Apply every AudioSource settings to the currently tracked sound

◆ GetAttenuationThreshold()

float OvAudio::Entities::AudioSource::GetAttenuationThreshold ( ) const

Returns the audio source attenuation threshold (Minimum distance before applying sound attenuation)

◆ GetPan()

float OvAudio::Entities::AudioSource::GetPan ( ) const

Returns the audio source pan (Left / Right)

◆ GetPitch()

float OvAudio::Entities::AudioSource::GetPitch ( ) const

Returns the audio source pitch (= frequency or playback speed)

◆ GetTrackedSound()

OvAudio::Tracking::SoundTracker * OvAudio::Entities::AudioSource::GetTrackedSound ( ) const

Returns the currently tracked sound if any, or nullptr

◆ GetVolume()

float OvAudio::Entities::AudioSource::GetVolume ( ) const

Returns the audio source volume

◆ IsFinished()

bool OvAudio::Entities::AudioSource::IsFinished ( ) const

Returns true if the audio source sound has finished

◆ IsLooped()

bool OvAudio::Entities::AudioSource::IsLooped ( ) const

Returns if the audio source is looping

◆ IsSpatial()

bool OvAudio::Entities::AudioSource::IsSpatial ( ) const

Returns true if the audio source is spatialized

◆ IsTrackingSound()

bool OvAudio::Entities::AudioSource::IsTrackingSound ( ) const

Returns true if a sound is currently being tracked

◆ Pause()

void OvAudio::Entities::AudioSource::Pause ( )

Pause the audio source

◆ Play()

void OvAudio::Entities::AudioSource::Play ( const Resources::Sound p_sound)

Play the given sound

Parameters
p_sound

◆ Resume()

void OvAudio::Entities::AudioSource::Resume ( )

Resume the audio source

◆ SetAttenuationThreshold()

void OvAudio::Entities::AudioSource::SetAttenuationThreshold ( float  p_distance)

Defines the audio source attenuation threshold (Minimum distance before applying sound attenuation)

Parameters
p_distance

◆ SetLooped()

void OvAudio::Entities::AudioSource::SetLooped ( bool  p_looped)

Defines if the audio source should loop

Parameters
p_looped

◆ SetPan()

void OvAudio::Entities::AudioSource::SetPan ( float  p_pan)

Defines the audio source pan (Left / Right)

Parameters
p_pan

◆ SetPitch()

void OvAudio::Entities::AudioSource::SetPitch ( float  p_pitch)

Defines the audio source pitch (= frequency or playback speed)

Parameters
p_pitch

◆ SetSpatial()

void OvAudio::Entities::AudioSource::SetSpatial ( bool  p_value)

Defines if the audio source should be spatialized or not

Parameters
p_value

◆ SetVolume()

void OvAudio::Entities::AudioSource::SetVolume ( float  p_volume)

Defines the audio source volume

Parameters
p_volume

◆ Stop()

void OvAudio::Entities::AudioSource::Stop ( )

Stop the audio source

◆ StopAndDestroyTrackedSound()

void OvAudio::Entities::AudioSource::StopAndDestroyTrackedSound ( )

Stop the audio source and destroy the tracked sound

◆ UpdateTrackedSoundPosition()

void OvAudio::Entities::AudioSource::UpdateTrackedSoundPosition ( )

Apply the AudioSource position to the tracked sound

Member Data Documentation

◆ CreatedEvent

OvTools::Eventing::Event< OvAudio::Entities::AudioSource & > OvAudio::Entities::AudioSource::CreatedEvent
static

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

◆ DestroyedEvent

OvTools::Eventing::Event< OvAudio::Entities::AudioSource & > OvAudio::Entities::AudioSource::DestroyedEvent
static

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