Version

    Other Documentation

menu_open
Wwise SDK 2021.1.14

◆ PostMIDIOnEventSync()

virtual AkPlayingID AK::IAkGlobalPluginContext::PostMIDIOnEventSync ( AkUniqueID  in_eventID,
AkGameObjectID  in_gameObjectID,
AkMIDIPost in_pPosts,
AkUInt16  in_uNumPosts,
bool  in_bAbsoluteOffsets = false,
AkUInt32  in_uFlags = 0,
AkCallbackFunc  in_pfnCallback = NULL,
void *  in_pCookie = NULL,
AkPlayingID  in_playingID = AK_INVALID_PLAYING_ID 
)
pure virtual

Executes a number of MIDI Events on all nodes that are referenced in the specified Event in an Action of type Play. Each MIDI event will be posted in AkMIDIPost::uOffset samples from the start of the current frame. The duration of a sample can be determined from the sound engine's audio settings, via a call to AK::IAkGlobalPluginContext::GetAudioSettings.

Remarks
This function executes the MIDI Events without going through the message queue. In order to do so it acquires the global Wwise sound engine lock. It should therefore only be called from one of the global engine hooks (see AK::IAkGlobalPluginContext::RegisterGlobalCallback). Use AK::IAkGlobalPluginContext::GetIDFromString() if you use event names (strings).
See also
Parameters
in_eventID Unique ID of the Event
in_gameObjectID Associated game object ID
in_pPosts MIDI Events to post
in_uNumPosts Number of MIDI Events to post
in_bAbsoluteOffsets Whether AkMIDIPost::uOffset values are relative to current frame or absolute
in_uFlags Bitmask: see AkCallbackType
in_pfnCallback Callback function
in_pCookie Callback cookie that will be sent to the callback function along with additional information
in_playingID Target playing ID

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise