![]() |
Plasma Engine
2.0
|
The Amplitude Audio Middleware. More...
#include <AmplitudeAudioSingleton.h>

Public Member Functions | |
| plResult | LoadConfiguration (const plOpenDdlReaderElement &reader) override |
| Loads the middleware-specif configuration from the ATL config file. | |
| plResult | Startup () override |
| Initializes the audio middleware. | |
| void | Update (plTime delta) override |
| Updates the audio middleware. | |
| plResult | Shutdown () override |
| Deinitializes and stop the audio middleware. | |
| plResult | Release () override |
| Destroys all the resources allocated by the audio middleware. This is usually called after Shutdown. | |
| plResult | StopAllSounds () override |
| Stops all the sounds actually played by the audio middleware. | |
| plResult | AddEntity (plAudioSystemEntityData *pEntityData, const char *szEntityName) override |
| Add/register an entity in the audio middleware. This is needed in order to provide transformation values (position and orientation), execute triggers (play sounds), and set real-time parameters or switches. | |
| plResult | ResetEntity (plAudioSystemEntityData *pEntityData) override |
| Resets an entity state. | |
| plResult | UpdateEntity (plAudioSystemEntityData *pEntityData) override |
| Updates an entity state. | |
| plResult | RemoveEntity (plAudioSystemEntityData *pEntityData) override |
| Remove/unregister an entity from the audio middleware. This action disable the possibility to execute triggers, set real-time parameters or switches, and update the position of the entity. | |
| plResult | SetEntityTransform (plAudioSystemEntityData *pEntityData, const plAudioSystemTransform &Transform) override |
| Sets the global position (world position) of an entity. | |
| plResult | LoadTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData, plAudioSystemEventData *pEventData) override |
| Loads a trigger for a further activation. All the data and media needed by the trigger will be loaded. Once done, the trigger status will change to Ready. | |
| plResult | ActivateTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData, plAudioSystemEventData *pEventData) override |
| Triggers an event on an entity. A trigger is everything which can affect the state of an event. | |
| plResult | UnloadTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData) override |
| Unload the trigger. This is called when the trigger and all data loaded during LoadTrigger need to be disposed. | |
| plResult | StopEvent (plAudioSystemEntityData *pEntityData, const plAudioSystemEventData *pEventData) override |
| Stops an event on the given entity. | |
| plResult | StopAllEvents (plAudioSystemEntityData *pEntityData) override |
| Stops all events active on the given entity. | |
| plResult | SetRtpc (plAudioSystemEntityData *pEntityData, const plAudioSystemRtpcData *pRtpcData, float fValue) override |
| Sets an audio RTPC to the specified value on an entity. | |
| plResult | ResetRtpc (plAudioSystemEntityData *pEntityData, const plAudioSystemRtpcData *pRtpcData) override |
| Resets an audio RTPC to the default value on an entity. | |
| plResult | SetSwitchState (plAudioSystemEntityData *pEntityData, const plAudioSystemSwitchStateData *pSwitchStateData) override |
| Sets an audio switch to the specified state on an entity. | |
| plResult | SetObstructionAndOcclusion (plAudioSystemEntityData *pEntityData, float fObstruction, float fOcclusion) override |
| Sets the obstruction and occlusion values on an entity. | |
| plResult | SetEnvironmentAmount (plAudioSystemEntityData *pEntityData, const plAudioSystemEnvironmentData *pEnvironmentData, float fAmount) override |
| Sets the amount of an audio environment effect associated on an entity. | |
| plResult | AddListener (plAudioSystemListenerData *pListenerData, const char *szListenerName) override |
| Add/register a listener in the audio middleware. This is needed to let the middleware know where to render audio, and to provide transformation values (position and orientation). | |
| plResult | ResetListener (plAudioSystemListenerData *pListenerData) override |
| Resets a listener state. | |
| plResult | RemoveListener (plAudioSystemListenerData *pListenerData) override |
| Remove/unregister a listener from the audio middleware. This action disable the possibility to update the position of the listener. | |
| plResult | SetListenerTransform (plAudioSystemListenerData *pListenerData, const plAudioSystemTransform &Transform) override |
| Sets the global transform (wold position and orientation) of a listener. | |
| plResult | LoadBank (plAudioSystemBankData *pBankData) override |
| Loads a bank file. | |
| plResult | UnloadBank (plAudioSystemBankData *pBankData) override |
| Unloads a bank file. | |
| plAudioSystemEntityData * | CreateWorldEntity (plAudioSystemDataID uiEntityId) override |
| Creates a world entity. This is a special entity used by non-spatial sounds. The engine will take care to create a game object at position (0,0,0) and orientation (0,0,0,1), and pass the game object ID as parameter to this function. The game object is ensured to never move nor rotate. | |
| plAudioSystemEntityData * | CreateEntityData (plAudioSystemDataID uiEntityId) override |
| Creates an audio entity that is attached to a game object. | |
| plResult | DestroyEntityData (plAudioSystemEntityData *pEntityData) override |
| Destroys an audio entity and release memory. | |
| plAudioSystemListenerData * | CreateListenerData (plAudioSystemDataID uiListenerId) override |
| Creates an audio listener that is attached to a game object. | |
| plResult | DestroyListenerData (plAudioSystemListenerData *pListenerData) override |
| Destroys an audio listener and release memory. | |
| plAudioSystemEventData * | CreateEventData (plAudioSystemDataID uiEventId) override |
| Creates an audio event that is attached to a game object. | |
| plResult | ResetEventData (plAudioSystemEventData *pEventData) override |
| Resets the audio event state, so it can safely recycled in the pool. | |
| plResult | DestroyEventData (plAudioSystemEventData *pEventData) override |
| Destroys an audio event and release memory. | |
| plResult | DestroyBank (plAudioSystemBankData *pBankData) override |
| Destroys an audio bank and release memory. | |
| plResult | DestroyTriggerData (plAudioSystemTriggerData *pTriggerData) override |
| Destroys an audio trigger and release memory. | |
| plResult | DestroyRtpcData (plAudioSystemRtpcData *pRtpcData) override |
| Destroys an audio rtpc and release memory. | |
| plResult | DestroySwitchStateData (plAudioSystemSwitchStateData *pSwitchStateData) override |
| Destroys an audio switch state and release memory. | |
| plResult | DestroyEnvironmentData (plAudioSystemEnvironmentData *pEnvironmentData) override |
| Destroys an audio environment effect and release memory. | |
| plResult | SetLanguage (const char *szLanguage) override |
| Sets the language used by the audio middleware. | |
| const char * | GetMiddlewareName () const override |
| Gets the audio middleware implementation name. e.g. "FMOD", "Wwise", "Amplitude", etc. | |
| float | GetMasterGain () const override |
| Gets the audio middleware's master gain. | |
| bool | GetMute () const override |
| Gets the audio middleware's muted state. | |
| void | OnMasterGainChange (float fGain) override |
| Called each time the master gain value change. | |
| void | OnMuteChange (bool bMute) override |
| Called when the audio middleware should toggle the muted state. \paarm bMute The muted state. | |
| void | OnLoseFocus () override |
| Called each time the game application window loses focus. | |
| void | OnGainFocus () override |
| Called each time the game application window gains focus. | |
| SparkyStudios::Audio::Amplitude::Engine * | GetEngine () const |
| plAudioSystemBankData * | DeserializeBankEntry (plStreamReader *pBankEntry) |
| Parses the entry in the controls collection that represent a bank. | |
| plAudioSystemTriggerData * | DeserializeTriggerEntry (plStreamReader *pTriggerEntry) const |
| Parses the entry in the controls collection that represent a trigger. | |
| plAudioSystemRtpcData * | DeserializeRtpcEntry (plStreamReader *pRtpcEntry) const |
| Parses the entry in the controls collection that represent a rtpc. | |
| plAudioSystemSwitchStateData * | DeserializeSwitchStateEntry (plStreamReader *pSwitchStateEntry) const |
| Parses the entry in the controls collection that represent a switch state. | |
| plAudioSystemEnvironmentData * | DeserializeEnvironmentEntry (plStreamReader *pEnvironmentEntry) const |
| Parses the entry in the controls collection that represent a environment effect. | |
Static Public Member Functions | |
| static void | GameApplicationEventHandler (const plGameApplicationExecutionEvent &e) |
The Amplitude Audio Middleware.
This class implements the plAudioMiddleware interface of the Audio System and allows the audio system to execute audio requests through Amplitude Audio.
|
overridevirtual |
Triggers an event on an entity. A trigger is everything which can affect the state of an event.
| pEntityData | The entity on which trigger the event. |
| pTriggerData | The event trigger. Can't be modified here. |
| pEventData | The triggered event. |
Implements plAudioMiddleware.
|
overridevirtual |
Add/register an entity in the audio middleware. This is needed in order to provide transformation values (position and orientation), execute triggers (play sounds), and set real-time parameters or switches.
| pEntityData | The entity that should be added in the audio middleware. |
| szEntityName | The name of the game object representing that entity. (Can be used for debug purposes) |
Implements plAudioMiddleware.
|
overridevirtual |
Add/register a listener in the audio middleware. This is needed to let the middleware know where to render audio, and to provide transformation values (position and orientation).
| pListenerData | The listener that should be added in the audio middleware. |
| szListenerName | The name of the game object representing that listener. (Can be used for debug purposes) |
Implements plAudioMiddleware.
|
overridevirtual |
Creates an audio entity that is attached to a game object.
| uiEntityId | The game object ID referencing the new audio entity. |
Implements plAudioMiddleware.
|
overridevirtual |
Creates an audio event that is attached to a game object.
| uiEventId | The game object ID referencing the new audio event. |
Implements plAudioMiddleware.
|
overridevirtual |
Creates an audio listener that is attached to a game object.
| uiListenerId | The game object ID referencing the new audio listener. |
Implements plAudioMiddleware.
|
overridevirtual |
Creates a world entity. This is a special entity used by non-spatial sounds. The engine will take care to create a game object at position (0,0,0) and orientation (0,0,0,1), and pass the game object ID as parameter to this function. The game object is ensured to never move nor rotate.
| uiEntityId | The game object ID referencing the new audio entity. |
Implements plAudioMiddleware.
| plAudioSystemBankData * plAmplitude::DeserializeBankEntry | ( | plStreamReader * | pBankEntry | ) |
Parses the entry in the controls collection that represent a bank.
| pBankEntry | The stream storing the bank entry. |
| plAudioSystemEnvironmentData * plAmplitude::DeserializeEnvironmentEntry | ( | plStreamReader * | pEnvironmentEntry | ) | const |
Parses the entry in the controls collection that represent a environment effect.
| pEnvironmentEntry | The stream storing the environment effect entry. |
| plAudioSystemRtpcData * plAmplitude::DeserializeRtpcEntry | ( | plStreamReader * | pRtpcEntry | ) | const |
Parses the entry in the controls collection that represent a rtpc.
| pRtpcEntry | The stream storing the rtpc entry. |
| plAudioSystemSwitchStateData * plAmplitude::DeserializeSwitchStateEntry | ( | plStreamReader * | pSwitchStateEntry | ) | const |
Parses the entry in the controls collection that represent a switch state.
| pSwitchStateEntry | The stream storing the switch state entry. |
| plAudioSystemTriggerData * plAmplitude::DeserializeTriggerEntry | ( | plStreamReader * | pTriggerEntry | ) | const |
Parses the entry in the controls collection that represent a trigger.
| pTriggerEntry | The stream storing the event entry. |
|
overridevirtual |
Destroys an audio bank and release memory.
| pBankData | The bank data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio entity and release memory.
| pEntityData | The entity data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio environment effect and release memory.
| pEnvironmentData | The environment effect data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio event and release memory.
| pEventData | The event data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio listener and release memory.
| pListenerData | The listener data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio rtpc and release memory.
| pRtpcData | The rtpc data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio switch state and release memory.
| pSwitchStateData | The switch state data to destroy. |
Implements plAudioMiddleware.
|
overridevirtual |
Destroys an audio trigger and release memory.
| pTriggerData | The trigger data to destroy. |
Implements plAudioMiddleware.
|
nodiscardoverridevirtual |
|
nodiscardoverridevirtual |
Gets the audio middleware implementation name. e.g. "FMOD", "Wwise", "Amplitude", etc.
Implements plAudioMiddleware.
|
nodiscardoverridevirtual |
|
overridevirtual |
Loads a bank file.
| pBankData | The bank data used for loading. |
Implements plAudioMiddleware.
|
overridevirtual |
Loads the middleware-specif configuration from the ATL config file.
| reader | The DDL file reader. |
Implements plAudioMiddleware.
|
overridevirtual |
Loads a trigger for a further activation. All the data and media needed by the trigger will be loaded. Once done, the trigger status will change to Ready.
Implements plAudioMiddleware.
|
overridevirtual |
Called each time the game application window gains focus.
Implements plAudioMiddleware.
|
overridevirtual |
Called each time the game application window loses focus.
Implements plAudioMiddleware.
|
overridevirtual |
Called each time the master gain value change.
| fGain | The master gain value. |
Implements plAudioMiddleware.
|
overridevirtual |
Called when the audio middleware should toggle the muted state. \paarm bMute The muted state.
Implements plAudioMiddleware.
|
overridevirtual |
Destroys all the resources allocated by the audio middleware. This is usually called after Shutdown.
Implements plAudioMiddleware.
|
overridevirtual |
Remove/unregister an entity from the audio middleware. This action disable the possibility to execute triggers, set real-time parameters or switches, and update the position of the entity.
| pEntityData | The entity that should be removed from the audio middleware. |
Implements plAudioMiddleware.
|
overridevirtual |
Remove/unregister a listener from the audio middleware. This action disable the possibility to update the position of the listener.
| pListenerData | The listener that should be removed from the audio middleware. |
Implements plAudioMiddleware.
|
overridevirtual |
Resets an entity state.
| pEntityData | The entity that should be reset. |
Implements plAudioMiddleware.
|
overridevirtual |
Resets the audio event state, so it can safely recycled in the pool.
| pEventData | The event data to reset. |
Implements plAudioMiddleware.
|
overridevirtual |
Resets a listener state.
| pListenerData | The listener that should be reset. |
Implements plAudioMiddleware.
|
overridevirtual |
Resets an audio RTPC to the default value on an entity.
| pEntityData | The entity on which reset the rtpc value. |
| pRtpcData | The rtpc data. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets the global position (world position) of an entity.
| pEntityData | The entity on which set the global position. |
| Transform | The global transform of the entity. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets the amount of an audio environment effect associated on an entity.
| pEntityData | The entity on which set the environment effect value. |
| pEnvironmentData | The environment effect data. |
| fAmount | The environment effect value. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets the language used by the audio middleware.
| szLanguage | The language to use. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets the global transform (wold position and orientation) of a listener.
| pListenerData | The listener data. |
| Transform | The global transformation of the listener. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets the obstruction and occlusion values on an entity.
| pEntityData | The entity on which set the obstruction and occlusion values. |
| fObstruction | The obstruction value. |
| fOcclusion | The occlusion value. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets an audio RTPC to the specified value on an entity.
| pEntityData | The entity on which set the rtpc value. |
| pRtpcData | The rtpc data. |
| fValue | The rtpc value. |
Implements plAudioMiddleware.
|
overridevirtual |
Sets an audio switch to the specified state on an entity.
| pEntityData | The entity on which set the switch value. |
| pSwitchStateData | The switch state data. |
Implements plAudioMiddleware.
|
overridevirtual |
Deinitializes and stop the audio middleware.
Implements plAudioMiddleware.
|
overridevirtual |
Initializes the audio middleware.
Implements plAudioMiddleware.
|
overridevirtual |
Stops all events active on the given entity.
| pEntityData | The entity on which stop all events. |
Implements plAudioMiddleware.
|
overridevirtual |
Stops all the sounds actually played by the audio middleware.
Implements plAudioMiddleware.
|
overridevirtual |
Stops an event on the given entity.
| pEntityData | The entity on which stop the event. |
| pEventData | The event to stop. |
Implements plAudioMiddleware.
|
overridevirtual |
Unloads a bank file.
| pBankData | The bank data used for unloading. |
Implements plAudioMiddleware.
|
overridevirtual |
Unload the trigger. This is called when the trigger and all data loaded during LoadTrigger need to be disposed.
| pEntityData | The entity on which trigger the event. |
| pTriggerData | The event trigger. Can't be modified here. |
Implements plAudioMiddleware.
|
overridevirtual |
Updates the audio middleware.
| delta | The elapsed time since the last update. |
Implements plAudioMiddleware.
|
overridevirtual |
Updates an entity state.
| pEntityData | The entity that should be updated. |
Implements plAudioMiddleware.