Plasma Engine  2.0
Loading...
Searching...
No Matches
plFmod Class Reference
Inheritance diagram for plFmod:

Public Member Functions

void Startup ()
 
void Shutdown ()
 
FMOD::Studio::System * GetStudioSystem () const
 
FMOD::System * GetLowLevelSystem () const
 
virtual void LoadConfiguration (plStringView sFile) override
 Can be called before startup to load the Fmod configs from a different file. Otherwise will automatically be loaded by Fmod startup with the default path.
 
virtual void SetOverridePlatform (plStringView sPlatform) override
 By default the Fmod integration will auto-detect the platform (and thus the config) to use. Calling this before startup allows to override which configuration is used.
 
virtual void UpdateSound () override
 Automatically called by the plugin every time plGameApplicationExecutionEvent::BeforeUpdatePlugins is fired.
 
virtual void SetMasterChannelVolume (float fVolume) override
 Adjusts the master volume. This affects all sounds, with no exception. Value must be between 0.0f and 1.0f.
 
virtual float GetMasterChannelVolume () const override
 
virtual void SetMasterChannelMute (bool bMute) override
 Allows to mute all sounds. Useful for when the application goes to a background state.
 
virtual bool GetMasterChannelMute () const override
 
virtual void SetMasterChannelPaused (bool bPaused) override
 Allows to pause all sounds. Useful for when the application goes to a background state and you want to pause all sounds, instead of mute them.
 
virtual bool GetMasterChannelPaused () const override
 
virtual void SetSoundGroupVolume (plStringView sVcaGroupGuid, float fVolume) override
 Specifies the volume for a VCA ('Voltage Control Amplifier').
 
virtual float GetSoundGroupVolume (plStringView sVcaGroupGuid) const override
 
void UpdateSoundGroupVolumes ()
 
virtual void SetNumListeners (plUInt8 uiNumListeners) override
 Default is 1. Allows to set how many virtual listeners the sound is mixed for (split screen game play).
 
virtual plUInt8 GetNumListeners () override
 
void SetNumBlendedReverbVolumes (plUInt8 uiNumBlendedVolumes)
 Configures how many reverb ('EAX') volumes are being blended/mixed for a sound.
 
plUInt8 GetNumBlendedReverbVolumes () const
 See SetNumBlendedReverbVolumes()
 
virtual void SetListenerOverrideMode (bool bEnabled) override
 The editor activates this to ignore the listener positions from the listener components, and instead use the editor camera as the listener position.
 
virtual void SetListener (plInt32 iIndex, const plVec3 &vPosition, const plVec3 &vForward, const plVec3 &vUp, const plVec3 &vVelocity) override
 Sets the position for listener N. Index -1 is used for the override mode listener.
 
plVec3 GetListenerPosition ()
 
virtual plResult OneShotSound (plStringView sResourceID, const plTransform &globalPosition, float fPitch=1.0f, float fVolume=1.0f, bool bBlockIfNotLoaded=true) override
 Plays a sound once. Callced by plSoundInterface::PlaySound().
 

Static Public Member Functions

static void GameApplicationEventHandler (const plGameApplicationExecutionEvent &e)
 
- 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.
 

Friends

class plFmodSoundBankResource
 

Member Function Documentation

◆ GetMasterChannelMute()

bool plFmod::GetMasterChannelMute ( ) const
overridevirtual

Implements plSoundInterface.

◆ GetMasterChannelPaused()

bool plFmod::GetMasterChannelPaused ( ) const
overridevirtual

Implements plSoundInterface.

◆ GetMasterChannelVolume()

float plFmod::GetMasterChannelVolume ( ) const
overridevirtual

Implements plSoundInterface.

◆ GetNumListeners()

plUInt8 plFmod::GetNumListeners ( )
overridevirtual

Implements plSoundInterface.

◆ GetSoundGroupVolume()

float plFmod::GetSoundGroupVolume ( plStringView sVcaGroupGuid) const
overridevirtual

Implements plSoundInterface.

◆ LoadConfiguration()

void plFmod::LoadConfiguration ( plStringView sFile)
overridevirtual

Can be called before startup to load the Fmod configs from a different file. Otherwise will automatically be loaded by Fmod startup with the default path.

Implements plSoundInterface.

◆ OneShotSound()

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

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

Implements plSoundInterface.

◆ SetListener()

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

Sets the position for listener N. Index -1 is used for the override mode listener.

Implements plSoundInterface.

◆ SetListenerOverrideMode()

void plFmod::SetListenerOverrideMode ( bool bEnabled)
overridevirtual

The editor activates this to ignore the listener positions from the listener components, and instead use the editor camera as the listener position.

Implements plSoundInterface.

◆ SetMasterChannelMute()

void plFmod::SetMasterChannelMute ( bool bMute)
overridevirtual

Allows to mute all sounds. Useful for when the application goes to a background state.

Implements plSoundInterface.

◆ SetMasterChannelPaused()

void plFmod::SetMasterChannelPaused ( bool bPaused)
overridevirtual

Allows to pause all sounds. Useful for when the application goes to a background state and you want to pause all sounds, instead of mute them.

Implements plSoundInterface.

◆ SetMasterChannelVolume()

void plFmod::SetMasterChannelVolume ( float fVolume)
overridevirtual

Adjusts the master volume. This affects all sounds, with no exception. Value must be between 0.0f and 1.0f.

Implements plSoundInterface.

◆ SetNumBlendedReverbVolumes()

void plFmod::SetNumBlendedReverbVolumes ( plUInt8 uiNumBlendedVolumes)

Configures how many reverb ('EAX') volumes are being blended/mixed for a sound.

The number is clamped between 0 and 4. 0 Means all environmental effects are disabled for all sound sources. 1 means only the most important reverb is applied. 2, 3 and 4 allow to add more fidelity, but will cost more CPU resources.

The default is currently 4.

◆ SetNumListeners()

void plFmod::SetNumListeners ( plUInt8 uiNumListeners)
overridevirtual

Default is 1. Allows to set how many virtual listeners the sound is mixed for (split screen game play).

Implements plSoundInterface.

◆ SetOverridePlatform()

void plFmod::SetOverridePlatform ( plStringView sPlatform)
overridevirtual

By default the Fmod integration 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 plFmod::SetSoundGroupVolume ( plStringView sVcaGroupGuid,
float fVolume )
overridevirtual

Specifies the volume for a VCA ('Voltage Control Amplifier').

This is used to control the volume of high level sound groups, such as 'Effects', 'Music', 'Ambiance or 'Speech'. Note that the Fmod strings banks are never loaded, so the given string must be a GUID (Fmod Studio -> Copy GUID).

Implements plSoundInterface.

◆ UpdateSound()

void plFmod::UpdateSound ( )
overridevirtual

Automatically called by the plugin every time plGameApplicationExecutionEvent::BeforeUpdatePlugins is fired.

Implements plSoundInterface.


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