Hello,
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;
}