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

Get GetSourceMultiplePlayPositions() to work on Unity 5.6.1?

+1 vote

Using GetSourceMultiplePlayPositions() we tried to track all source play positions of an event, but we didn't get it work.  This is our current implementation:

Post Event code as used for GetSourcePlayPosition (works for GetSourcePlayPosition  but apparently not for GetSourceMultiplePlayPositions):

testEventId = AkSoundEngine.PostEvent(AK.EVENTS.TEST, gameObject, (uint)(AkCallbackType.AK_EnableGetSourcePlayPosition | AkCallbackType.AK_EndOfEvent), FinishedPlaying, null);

Call to GetSourceMultiplePlayPositions Method:

AKRESULT result = AkSoundEngine.GetSourceMultiplePlayPositions(testEventId, audioNode, mediaID, msTime, ref io_Positions, true);

'result' was always Ak.Fail in our tests. Is there something we are missing or is the method just not supported for the Unity version of wwise?

asked Jun 28, 2017 in General Discussion by Dominic P. (270 points)
edited Jun 29, 2017 by Dominic P.
Hi there, I'm having a similar issue. Did you ever find out a solution to this?
Hi Blake!

This is some time ago now, but we managed it to work. If I remember correctly, we did not initalize the array of audioNode, mediaID, msTime to the same size as setin the io_Positions parameter. In our working solution, we set io_Positions=5 and the arrays audioNode, mediaID, msTime have the same size(eg.  uint[] mediaID = new uint[5];). Though badly documented the method works as expected.

Hope that helps you...
That seems to do the trick! Thanks so much for your reply.
You are welcome ;-)

Please sign-in or register to answer this question.