Plasma Engine  2.0
Loading...
Searching...
No Matches
plAudioSystem Class Referencefinal

The AudioSystem. More...

#include <AudioSystem.h>

Inheritance diagram for plAudioSystem:

Public Member Functions

void LoadConfiguration (plStringView sFile) override
 This should be called in the audio middleware implementation startup to load the AudioSystem with the correct configuration.
 
void SetOverridePlatform (plStringView sPlatform) override
 By default, the AudioSystem will auto-detect the platform (and thus the config) to use. Calling this before startup allows to override which configuration is used.
 
void UpdateSound () override
 Called once per frame to update all sounds.
 
void SetMasterChannelVolume (float fVolume) override
 Asks the audio middleware to adjust its master volume.
 
float GetMasterChannelVolume () const override
 Gets the master volume of the audio middleware.
 
void SetMasterChannelMute (bool bMute) override
 Asks the audio middleware to mute its master channel.
 
bool GetMasterChannelMute () const override
 Gets the muted state of the audio middleware master channel.
 
void SetMasterChannelPaused (bool bPaused) override
 Asks the audio middleware to pause every playbacks.
 
bool GetMasterChannelPaused () const override
 Gets the paused state of the audio middleware.
 
void SetSoundGroupVolume (plStringView sVcaGroupGuid, float fVolume) override
 Asks the audio middleware to adjust the volume of a sound group.
 
float GetSoundGroupVolume (plStringView sVcaGroupGuid) const override
 Gets a sound group volume from the audio middleware.
 
void SetNumListeners (plUInt8 uiNumListeners) override
 Asks the audio middleware to set the required number of listeners.
 
plUInt8 GetNumListeners () override
 Gets the number of listeners from the audio middleware.
 
void SetListenerOverrideMode (bool bEnabled) override
 Overrides the active audio middleware listener by the editor camera. Transformation data will be provided by the editor camera.
 
void SetListener (plInt32 iIndex, const plVec3 &vPosition, const plVec3 &vForward, const plVec3 &vUp, const plVec3 &vVelocity) override
 Sets the transformation of the listener with the given ID. ID -1 is used for the override mode listener (editor camera).
 
plResult OneShotSound (plStringView sResourceID, const plTransform &globalPosition, float fPitch=1.0f, float fVolume=1.0f, bool bBlockIfNotLoaded=true) override
 Plays a sound once. Called by plSoundInterface::PlaySound().
 
bool Startup ()
 
void Shutdown ()
 
bool IsInitialized () const
 
void SendRequest (plVariant &&request)
 
void SendRequests (plAudioSystemRequestsQueue &requests)
 
void SendRequestSync (plVariant &&request)
 
plAudioSystemDataID GetTriggerId (plStringView sTriggerName) const
 
plAudioSystemDataID GetRtpcId (plStringView sRtpcName) const
 
plAudioSystemDataID GetSwitchStateId (plStringView sSwitchStateName) const
 
plAudioSystemDataID GetEnvironmentId (plStringView sEnvironmentName) const
 
plAudioSystemDataID GetBankId (plStringView sBankName) const
 
void RegisterTrigger (plAudioSystemDataID uiId, plAudioSystemTriggerData *pTriggerData)
 
void RegisterRtpc (plAudioSystemDataID uiId, plAudioSystemRtpcData *pRtpcData)
 
void RegisterSwitchState (plAudioSystemDataID uiId, plAudioSystemSwitchStateData *pSwitchStateData)
 
void RegisterEnvironment (plAudioSystemDataID uiId, plAudioSystemEnvironmentData *pEnvironmentData)
 
void RegisterSoundBank (plAudioSystemDataID uiId, plAudioSystemBankData *pSoundBankData)
 
void UnregisterEntity (plAudioSystemDataID uiId)
 
void UnregisterListener (plAudioSystemDataID uiId)
 
void UnregisterTrigger (plAudioSystemDataID uiId)
 
void UnregisterRtpc (plAudioSystemDataID uiId)
 
void UnregisterSwitchState (plAudioSystemDataID uiId)
 
void UnregisterEnvironment (plAudioSystemDataID uiId)
 
void UnregisterSoundBank (plAudioSystemDataID uiId)
 

Friends

class plAudioThread
 
class plAudioTranslationLayer
 

Additional Inherited Members

- Static Public Member Functions inherited from plSoundInterface
static PL_CORE_DLL plResult PlaySound (plStringView sResourceID, const plTransform &globalPosition, float fPitch=1.0f, float fVolume=1.0f, bool bBlockIfNotLoaded=true)
 Plays a sound once.
 

Detailed Description

The AudioSystem.

This class is responsible to handle the communication between the ATL and PL. It implements the plSoundInterface class and provides methods to push audio requests in the requests queue (synchronously or asynchronously).

Member Function Documentation

◆ GetMasterChannelMute()

bool plAudioSystem::GetMasterChannelMute ( ) const
overridevirtual

Gets the muted state of the audio middleware master channel.

Implements plSoundInterface.

◆ GetMasterChannelPaused()

bool plAudioSystem::GetMasterChannelPaused ( ) const
overridevirtual

Gets the paused state of the audio middleware.

Implements plSoundInterface.

◆ GetMasterChannelVolume()

float plAudioSystem::GetMasterChannelVolume ( ) const
overridevirtual

Gets the master volume of the audio middleware.

Implements plSoundInterface.

◆ GetNumListeners()

plUInt8 plAudioSystem::GetNumListeners ( )
overridevirtual

Gets the number of listeners from the audio middleware.

Implements plSoundInterface.

◆ GetSoundGroupVolume()

float plAudioSystem::GetSoundGroupVolume ( plStringView sVcaGroupGuid) const
overridevirtual

Gets a sound group volume from the audio middleware.

Implements plSoundInterface.

◆ LoadConfiguration()

void plAudioSystem::LoadConfiguration ( plStringView sFile)
overridevirtual

This should be called in the audio middleware implementation startup to load the AudioSystem with the correct configuration.

Implements plSoundInterface.

◆ OneShotSound()

plResult plAudioSystem::OneShotSound ( plStringView sResourceID,
const plTransform & globalPosition,
float fPitch = 1.0f,
float fVolume = 1.0f,
bool bBlockIfNotLoaded = true )
overridevirtual

Plays a sound once. Called by plSoundInterface::PlaySound().

Implements plSoundInterface.

◆ SetListener()

void plAudioSystem::SetListener ( plInt32 iIndex,
const plVec3 & vPosition,
const plVec3 & vForward,
const plVec3 & vUp,
const plVec3 & vVelocity )
overridevirtual

Sets the transformation of the listener with the given ID. ID -1 is used for the override mode listener (editor camera).

Implements plSoundInterface.

◆ SetListenerOverrideMode()

void plAudioSystem::SetListenerOverrideMode ( bool bEnabled)
overridevirtual

Overrides the active audio middleware listener by the editor camera. Transformation data will be provided by the editor camera.

Implements plSoundInterface.

◆ SetMasterChannelMute()

void plAudioSystem::SetMasterChannelMute ( bool bMute)
overridevirtual

Asks the audio middleware to mute its master channel.

Implements plSoundInterface.

◆ SetMasterChannelPaused()

void plAudioSystem::SetMasterChannelPaused ( bool bPaused)
overridevirtual

Asks the audio middleware to pause every playbacks.

Implements plSoundInterface.

◆ SetMasterChannelVolume()

void plAudioSystem::SetMasterChannelVolume ( float fVolume)
overridevirtual

Asks the audio middleware to adjust its master volume.

Implements plSoundInterface.

◆ SetNumListeners()

void plAudioSystem::SetNumListeners ( plUInt8 uiNumListeners)
inlineoverridevirtual

Asks the audio middleware to set the required number of listeners.

Implements plSoundInterface.

◆ SetOverridePlatform()

void plAudioSystem::SetOverridePlatform ( plStringView sPlatform)
overridevirtual

By default, the AudioSystem will auto-detect the platform (and thus the config) to use. Calling this before startup allows to override which configuration is used.

Implements plSoundInterface.

◆ SetSoundGroupVolume()

void plAudioSystem::SetSoundGroupVolume ( plStringView sVcaGroupGuid,
float fVolume )
overridevirtual

Asks the audio middleware to adjust the volume of a sound group.

Implements plSoundInterface.

◆ UpdateSound()

void plAudioSystem::UpdateSound ( )
overridevirtual

Called once per frame to update all sounds.

Implements plSoundInterface.


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