MCPcopy Create free account
hub / github.com/carbonengine/trinity / SendEventToAudEmitter

Function SendEventToAudEmitter

trinity/TriObserverLocal.cpp:121–130  ·  view source on GitHub ↗

----------------------------------------------------- Description: Send an audio event to an observer if it is not a nullptr and can be cast to ITr2AudEmitter. Arguments: observer - The observer that you want to send an audio event to. audioEvent - The audio event you want to be sent to the sound engine. -----------------------------------------------------

Source from the content-addressed store, hash-verified

119// audioEvent - The audio event you want to be sent to the sound engine.
120//-----------------------------------------------------
121void SendEventToAudEmitter( TriObserverLocal* observer, const std::wstring& audioEvent )
122{
123 if( observer != nullptr )
124 {
125 if( ITr2AudEmitter* emitter = dynamic_cast<ITr2AudEmitter*>( observer->GetObserver() ) )
126 {
127 emitter->SendEvent( audioEvent );
128 }
129 }
130}

Callers 2

EnterStateIdleMethod · 0.85
SetTargetObjectMethod · 0.85

Calls 1

GetObserverMethod · 0.80

Tested by

no test coverage detected