社区问答

欢迎来到 Audiokinetic 社区问答论坛。在此,Wwise 和 Strata 用户可互帮互助。如需我们团队直接提供协助,请前往技术支持申请单页面。若要报告问题,请在 Audiokinetic Launcher 中选择“报告错误”选项(注意,问答论坛并不会接收错误报告)。我们内部设有专门的错误报告系统,会有专人查看报告并设法解决问题。

要想尽快得到满意的解答,请在提问时注意以下几点:

  • 描述尽量具体:比如,想达到什么样的目的,或者具体哪里有问题。
  • 包含关键细节:比如,Wwise 和游戏引擎版本以及所用操作系统等等。
  • 阐明所做努力:阐明自己为了排除故障都采取了哪些措施。
  • 聚焦问题本身:聚焦于问题本身的相关技术细节,以便别人可以快速找到解决方案。

0 投票
Hi everybody,

For a musical game developped with Unity3D, I have a background music (used to define the beat) and I need to have some short sequences (a few seconds) launched randomly on the beat.
Those sequences must be synchronized with background music, so I'm using Stinger in Wwise to do launch the sequence on next beat.

OK, It is working fine...except that in Unity, I cannot use events callbackswith posttrigger (so, I cannot know if and when the sequence start playing, the source position, neither the end of the sequence).
It's problematic for me, because each sequence is a short gameplay phase, and I really need this information to be accurate.
I tried to extrapolate those information (on the assumption that next beat corresponds to sequence starting time), but :
1) it is not very accurate and can lead to bugs and errors
2) I need to enter manually custom cues and sequence duration times in Unity...I have a lot of sequence, so it can be fastidious and an errors source

Is there a way to use callbacks (or tho have information about sequences played) with stingers / post triggers ?

I also tried another approach : listening AkCallbackType.AK_MusicSyncBeat events on the background music, and posting the sequence event on the next beat via Unity.
But I'm afraid to encounter synchronization problem with this method...do you think it can be the case ?

Else, would you have a third solution to do this (have a sequence synchronized on background music, and be able to recover playing information, including custom cues) ?

Many thanks in advance for your help
分类:General Discussion | 用户: Olivier F. (140 分)

2 个回答

0 投票
Hey olivier,

Sorry if i got you hyped for an answer.

I just encountered the same issue, if you found a solution by now i would be glad to hear about it.

 

Dean
用户: ‪Dean k. (150 分)
0 投票
Hi,

I finally found a solution : using "GetPlayingSegmentInfo" on the background music...
When I receive my beat information, I post the trigger, then, on next beat, I get the segment info (and so, the read position in the background music).
Then I store this information as the "Start Time" of the sequence.
Every time I need to have a relative time in the sequence, I just do "music segment info" - Start Time.

This way, the sequence is launched with stingers, but I have accurate timing for gameplay phases.

Hope it's clear and it helped ;)
用户: Olivier F. (140 分)
...