![]() |
Plasma Engine
2.0
|
The Audio Middleware Interface. This interface should be implemented by the ATL middleware to communicate with the audio system. More...
#include <AudioMiddleware.h>
Public Member Functions | |
virtual plResult | LoadConfiguration (const plOpenDdlReaderElement &reader)=0 |
Loads the middleware-specif configuration from the ATL config file. | |
virtual plResult | Startup ()=0 |
Initializes the audio middleware. | |
virtual void | Update (plTime delta)=0 |
Updates the audio middleware. | |
virtual plResult | Shutdown ()=0 |
Deinitializes and stop the audio middleware. | |
virtual plResult | Release ()=0 |
Destroys all the resources allocated by the audio middleware. This is usually called after Shutdown. | |
virtual plResult | StopAllSounds ()=0 |
Stops all the sounds actually played by the audio middleware. | |
virtual plResult | AddEntity (plAudioSystemEntityData *pEntityData, const char *szEntityName)=0 |
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. | |
virtual plResult | ResetEntity (plAudioSystemEntityData *pEntityData)=0 |
Resets an entity state. | |
virtual plResult | UpdateEntity (plAudioSystemEntityData *pEntityData)=0 |
Updates an entity state. | |
virtual plResult | RemoveEntity (plAudioSystemEntityData *pEntityData)=0 |
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. | |
virtual plResult | SetEntityTransform (plAudioSystemEntityData *pEntityData, const plAudioSystemTransform &Transform)=0 |
Sets the global position (world position) of an entity. | |
virtual plResult | LoadTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData, plAudioSystemEventData *pEventData)=0 |
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. | |
virtual plResult | ActivateTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData, plAudioSystemEventData *pEventData)=0 |
Triggers an event on an entity. A trigger is everything which can affect the state of an event. | |
virtual plResult | UnloadTrigger (plAudioSystemEntityData *pEntityData, const plAudioSystemTriggerData *pTriggerData)=0 |
Unload the trigger. This is called when the trigger and all data loaded during LoadTrigger need to be disposed. | |
virtual plResult | StopEvent (plAudioSystemEntityData *pEntityData, const plAudioSystemEventData *pEventData)=0 |
Stops an event on the given entity. | |
virtual plResult | StopAllEvents (plAudioSystemEntityData *pEntityData)=0 |
Stops all events active on the given entity. | |
virtual plResult | SetRtpc (plAudioSystemEntityData *pEntityData, const plAudioSystemRtpcData *pRtpcData, float fValue)=0 |
Sets an audio RTPC to the specified value on an entity. | |
virtual plResult | ResetRtpc (plAudioSystemEntityData *pEntityData, const plAudioSystemRtpcData *pRtpcData)=0 |
Resets an audio RTPC to the default value on an entity. | |
virtual plResult | SetSwitchState (plAudioSystemEntityData *pEntityData, const plAudioSystemSwitchStateData *pSwitchStateData)=0 |
Sets an audio switch to the specified state on an entity. | |
virtual plResult | SetObstructionAndOcclusion (plAudioSystemEntityData *pEntityData, float fObstruction, float fOcclusion)=0 |
Sets the obstruction and occlusion values on an entity. | |
virtual plResult | SetEnvironmentAmount (plAudioSystemEntityData *pEntityData, const plAudioSystemEnvironmentData *pEnvironmentData, float fAmount)=0 |
Sets the amount of an audio environment effect associated on an entity. | |
virtual plResult | AddListener (plAudioSystemListenerData *pListenerData, const char *szListenerName)=0 |
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). | |
virtual plResult | ResetListener (plAudioSystemListenerData *pListenerData)=0 |
Resets a listener state. | |
virtual plResult | RemoveListener (plAudioSystemListenerData *pListenerData)=0 |
Remove/unregister a listener from the audio middleware. This action disable the possibility to update the position of the listener. | |
virtual plResult | SetListenerTransform (plAudioSystemListenerData *pListenerData, const plAudioSystemTransform &Transform)=0 |
Sets the global transform (wold position and orientation) of a listener. | |
virtual plResult | LoadBank (plAudioSystemBankData *pBankData)=0 |
Loads a bank file. | |
virtual plResult | UnloadBank (plAudioSystemBankData *pBankData)=0 |
Unloads a bank file. | |
virtual plAudioSystemEntityData * | CreateWorldEntity (plAudioSystemDataID uiEntityId)=0 |
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. | |
virtual plAudioSystemEntityData * | CreateEntityData (plAudioSystemDataID uiEntityId)=0 |
Creates an audio entity that is attached to a game object. | |
virtual plResult | DestroyEntityData (plAudioSystemEntityData *pEntityData)=0 |
Destroys an audio entity and release memory. | |
virtual plAudioSystemListenerData * | CreateListenerData (plAudioSystemDataID uiListenerId)=0 |
Creates an audio listener that is attached to a game object. | |
virtual plResult | DestroyListenerData (plAudioSystemListenerData *pListenerData)=0 |
Destroys an audio listener and release memory. | |
virtual plAudioSystemEventData * | CreateEventData (plAudioSystemDataID uiEventId)=0 |
Creates an audio event that is attached to a game object. | |
virtual plResult | ResetEventData (plAudioSystemEventData *pEventData)=0 |
Resets the audio event state, so it can safely recycled in the pool. | |
virtual plResult | DestroyEventData (plAudioSystemEventData *pEventData)=0 |
Destroys an audio event and release memory. | |
virtual plResult | DestroyBank (plAudioSystemBankData *pBankData)=0 |
Destroys an audio bank and release memory. | |
virtual plResult | DestroyTriggerData (plAudioSystemTriggerData *pTriggerData)=0 |
Destroys an audio trigger and release memory. | |
virtual plResult | DestroyRtpcData (plAudioSystemRtpcData *pRtpcData)=0 |
Destroys an audio rtpc and release memory. | |
virtual plResult | DestroySwitchStateData (plAudioSystemSwitchStateData *pSwitchStateData)=0 |
Destroys an audio switch state and release memory. | |
virtual plResult | DestroyEnvironmentData (plAudioSystemEnvironmentData *pEnvironmentData)=0 |
Destroys an audio environment effect and release memory. | |
virtual plResult | SetLanguage (const char *szLanguage)=0 |
Sets the language used by the audio middleware. | |
virtual const char * | GetMiddlewareName () const =0 |
Gets the audio middleware implementation name. e.g. "FMOD", "Wwise", "Amplitude", etc. | |
virtual float | GetMasterGain () const =0 |
Gets the audio middleware's master gain. | |
virtual bool | GetMute () const =0 |
Gets the audio middleware's muted state. | |
virtual void | OnMasterGainChange (float fGain)=0 |
Called each time the master gain value change. | |
virtual void | OnMuteChange (bool bMute)=0 |
Called when the audio middleware should toggle the muted state. \paarm bMute The muted state. | |
virtual void | OnLoseFocus ()=0 |
Called each time the game application window loses focus. | |
virtual void | OnGainFocus ()=0 |
Called each time the game application window gains focus. | |
The Audio Middleware Interface. This interface should be implemented by the ATL middleware to communicate with the audio system.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
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) |
Implemented in plAmplitude.
|
pure virtual |
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) |
Implemented in plAmplitude.
|
pure virtual |
Creates an audio entity that is attached to a game object.
uiEntityId | The game object ID referencing the new audio entity. |
Implemented in plAmplitude.
|
pure virtual |
Creates an audio event that is attached to a game object.
uiEventId | The game object ID referencing the new audio event. |
Implemented in plAmplitude.
|
pure virtual |
Creates an audio listener that is attached to a game object.
uiListenerId | The game object ID referencing the new audio listener. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio bank and release memory.
pBankData | The bank data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio entity and release memory.
pEntityData | The entity data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio environment effect and release memory.
pEnvironmentData | The environment effect data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio event and release memory.
pEventData | The event data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio listener and release memory.
pListenerData | The listener data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio rtpc and release memory.
pRtpcData | The rtpc data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio switch state and release memory.
pSwitchStateData | The switch state data to destroy. |
Implemented in plAmplitude.
|
pure virtual |
Destroys an audio trigger and release memory.
pTriggerData | The trigger data to destroy. |
Implemented in plAmplitude.
|
nodiscardpure virtual |
|
nodiscardpure virtual |
Gets the audio middleware implementation name. e.g. "FMOD", "Wwise", "Amplitude", etc.
Implemented in plAmplitude.
|
nodiscardpure virtual |
|
pure virtual |
Loads a bank file.
pBankData | The bank data used for loading. |
Implemented in plAmplitude.
|
pure virtual |
Loads the middleware-specif configuration from the ATL config file.
reader | The DDL file reader. |
Implemented in plAmplitude.
|
pure virtual |
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.
Implemented in plAmplitude.
|
pure virtual |
Called each time the game application window gains focus.
Implemented in plAmplitude.
|
pure virtual |
Called each time the game application window loses focus.
Implemented in plAmplitude.
|
pure virtual |
Called each time the master gain value change.
fGain | The master gain value. |
Implemented in plAmplitude.
|
pure virtual |
Called when the audio middleware should toggle the muted state. \paarm bMute The muted state.
Implemented in plAmplitude.
|
pure virtual |
Destroys all the resources allocated by the audio middleware. This is usually called after Shutdown.
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
Resets an entity state.
pEntityData | The entity that should be reset. |
Implemented in plAmplitude.
|
pure virtual |
Resets the audio event state, so it can safely recycled in the pool.
pEventData | The event data to reset. |
Implemented in plAmplitude.
|
pure virtual |
Resets a listener state.
pListenerData | The listener that should be reset. |
Implemented in plAmplitude.
|
pure virtual |
Resets an audio RTPC to the default value on an entity.
pEntityData | The entity on which reset the rtpc value. |
pRtpcData | The rtpc data. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
Sets the language used by the audio middleware.
szLanguage | The language to use. |
Implemented in plAmplitude.
|
pure virtual |
Sets the global transform (wold position and orientation) of a listener.
pListenerData | The listener data. |
Transform | The global transformation of the listener. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
Deinitializes and stop the audio middleware.
Implemented in plAmplitude.
|
pure virtual |
Initializes the audio middleware.
Implemented in plAmplitude.
|
pure virtual |
Stops all events active on the given entity.
pEntityData | The entity on which stop all events. |
Implemented in plAmplitude.
|
pure virtual |
Stops all the sounds actually played by the audio middleware.
Implemented in plAmplitude.
|
pure virtual |
Stops an event on the given entity.
pEntityData | The entity on which stop the event. |
pEventData | The event to stop. |
Implemented in plAmplitude.
|
pure virtual |
Unloads a bank file.
pBankData | The bank data used for unloading. |
Implemented in plAmplitude.
|
pure virtual |
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. |
Implemented in plAmplitude.
|
pure virtual |
Updates the audio middleware.
delta | The elapsed time since the last update. |
Implemented in plAmplitude.
|
pure virtual |
Updates an entity state.
pEntityData | The entity that should be updated. |
Implemented in plAmplitude.