CryAudio::Impl::IObject

CryAudio::Impl::IObjectabstract

#include

Public Member Functions

virtual ERequestStatus Update ()=0
virtual ERequestStatus Set3DAttributes (SObject3DAttributes const &attributes)=0
virtual ERequestStatus SetEnvironment (IEnvironment const *const pIEnvironment, float const amount)=0
virtual ERequestStatus SetParameter (IParameter const *const pIParameter, float const value)=0
virtual ERequestStatus SetSwitchState (ISwitchState const *const pISwitchState)=0
virtual ERequestStatus SetObstructionOcclusion (float const obstruction, float const occlusion)=0
virtual ERequestStatus ExecuteTrigger (ITrigger const *const pITrigger, IEvent *const pIEvent)=0
virtual ERequestStatus StopAllTriggers ()=0
virtual ERequestStatus PlayFile (IStandaloneFile *const pIStandaloneFile)=0
virtual ERequestStatus StopFile (IStandaloneFile *const pIStandaloneFile)=0
virtual ERequestStatus SetName (char const *const szName)=0

Detailed Description

An implementation may use this interface to define a class for storing implementation-specific data needed for identifying and using the corresponding audio object (e.g. a middleware-specific unique ID)

Member Function Documentation

◆ ExecuteTrigger()

virtual ERequestStatus CryAudio::Impl::IObject::ExecuteTrigger ( ITrigger const *const pITrigger,
IEvent *const pIEvent
)
pure virtual

Activate a trigger on this audio object

Parameters
pITrigger- implementation-specific trigger to activate
pIEvent- implementation-specific event corresponding to this particular trigger activation
Returns
ERequestStatus::Success if the ITrigger has been successfully activated by the audio middleware, ERequestStatus::Failure otherwise
See also
SetParameter, SetSwitchState

◆ PlayFile()

virtual ERequestStatus CryAudio::Impl::IObject::PlayFile ( IStandaloneFile *const pIStandaloneFile)
pure virtual

Play a stand alone audio file

Parameters
pIStandaloneFile- stand alone file to play
Returns
ERequestStatus::Success if the file started playback, ERequestStatus::Failure otherwise.
See also
StopFile

◆ Set3DAttributes()

virtual ERequestStatus CryAudio::Impl::IObject::Set3DAttributes ( SObject3DAttributes const & attributes)
pure virtual

Set the 3D attributes of the audio object

Parameters
attributes- a struct containing the audio object's transformation and velocity
Returns
ERequestStatus::Success if the AudioObject's position has been successfully set, ERequestStatus::Failure otherwise

◆ SetEnvironment()

virtual ERequestStatus CryAudio::Impl::IObject::SetEnvironment ( IEnvironment const *const pIEnvironment,
float const amount
)
pure virtual

Set the provided value for the specified environment on the audio object

Parameters
pIEnvironment- implementation-specific environment to set
amount- the fade value for the provided IEnvironment, 0.0f means no effect at all, 1.0f corresponds to the full effect
Returns
ERequestStatus::Success if the provided the value has been successfully set, ERequestStatus::Failure otherwise

◆ SetName()

virtual ERequestStatus CryAudio::Impl::IObject::SetName ( char const *const szName)
pure virtual

Sets this audio object's name. Is only used during production whenever an entity's name is changed to adjust corresponding audio objects as well.

Parameters
szName- name to set.
Returns
ERequestStatus::Success if the object was renamed successfully, ERequestStatus::Failure otherwise.

◆ SetObstructionOcclusion()

virtual ERequestStatus CryAudio::Impl::IObject::SetObstructionOcclusion ( float const obstruction,
float const occlusion
)
pure virtual

Set the provided Obstruction and Occlusion values

Parameters
obstruction- the obstruction value to be set; it describes how much the direct sound path from the AudioObject to the Listener is obstructed
occlusion- the occlusion value to be set; it describes how much all sound paths (direct and indirect) are obstructed
Returns
ERequestStatus::Success if the provided the values been successfully set, ERequestStatus::Failure otherwise
See also
SetEnvironment

◆ SetParameter()

virtual ERequestStatus CryAudio::Impl::IObject::SetParameter ( IParameter const *const pIParameter,
float const value
)
pure virtual

Set the provided parameter to the specified value on the audio object

Parameters
pIParameter- implementation-specific parameter to set
value- the value to set the parameter to
Returns
ERequestStatus::Success if the provided value has been successfully set on the passed IAudioParameter, ERequestStatus::Failure otherwise
See also
ExecuteTrigger, SetSwitchState, SetEnvironment, SetListener3DAttributes

◆ SetSwitchState()

virtual ERequestStatus CryAudio::Impl::IObject::SetSwitchState ( ISwitchState const *const pISwitchState)
pure virtual

Set the provided state (on a switch) on the audio object

Parameters
pISwitchState- implementation-specific state to set
Returns
ERequestStatus::Success if the provided ISwitchState has been successfully set, ERequestStatus::Failure otherwise
See also
ExecuteTrigger, SetParameter, SetEnvironment, Set3DAttributes

◆ StopAllTriggers()

virtual ERequestStatus CryAudio::Impl::IObject::StopAllTriggers ( )
pure virtual

Stop all triggers currently active on the audio object

Returns
ERequestStatus::Success if all of the triggers have been successfully stopped, ERequestStatus::Failure otherwise
See also
ExecuteTrigger

◆ StopFile()

virtual ERequestStatus CryAudio::Impl::IObject::StopFile ( IStandaloneFile *const pIStandaloneFile)
pure virtual

Stop currently playing standalone file

Parameters
pIStandaloneFile- file to stop playing
Returns
ERequestStatus::Success if the file stopped, is stopping or is not playing anymore, ERequestStatus::Failure otherwise.
See also
PlayFile

◆ Update()

virtual ERequestStatus CryAudio::Impl::IObject::Update ( )
pure virtual

Performs actions that need to be executed regularly on an AudioObject. Called with every tick of the audio thread.

Returns
ERequestStatus::Success if the object has been successfully updated, ERequestStatus::Failure otherwise.