Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Access multiple callbacks

0 votes


I am trying to access both the custom cues and AK_MusicSyncBeat from my playing segment. My goal is to be able to react to each grid tick as well as custom cues from within my code. I managed get the custom cue strings into Unity but I cannot figure out how to use the beat information. I tried my best to go through the Music Callback Demo Integration and SDK documentation but I am still relatively new to programming. Maybe someone can point me in the right direction? 

Here is my code:

    // extract the text from User Cues 
    public void PostMusicEvent (string noteOn) 
        AkSoundEngine.PostEvent(noteOn, gameObject, (uint)AkCallbackType.AK_MusicSyncUserCue | (uint)AkCallbackType.AK_MusicSyncBeat, MusicCallBack, this);

    private void MusicCallBack (object in_cookie, AkCallbackType in_type,  object in_callbackInfo)
        AkCallbackManager.AkMusicSyncCallbackInfo musicInfo = in_callbackInfo as AkCallbackManager.AkMusicSyncCallbackInfo;

        callbackText = musicInfo.pszUserCueName;
        //gridTick = AkCallbackType.AK_MusicSyncBeat;

asked Apr 2, 2016 in General Discussion by Brad F. (150 points)

Please sign-in or register to answer this question.