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.

有关akenvironment的两个问题

0 votes
你们好,我有两个有关AKEnvironment的问题想问。

1,AkAuxSendArray 这个类型和老版本的不一样。现在传入的 fValue 会先使用,CSharp_AkAuxSendValueProxy_set 设置一下。

不知道这个fValue具体指什么意思,CSharp_AkAuxSendValueProxy_set的作用又是什么。

AkEnvironment中GetAuxSendValueForPosition()函数直接返回1,然后赋值给AkAuxSendArray的fValue,fValue等于1又是代表什么。

2,CSharp_SetGameObjectAuxSendValues 这个直接传的那个m_Buffer只是分配了一段非托管内存,但是内存里面具体都没有可能赋值的地方。

具体是用来做什么的。
asked Mar 15, 2017 in General Discussion by qin j. (100 points)

1 Answer

0 votes
不清楚你在说哪个版本。

1. AuxSend 在 Wwise 中一般对应一个环境音效的区域,因为相邻区域间要做过渡处理,这个“fValue”代表当前游戏对象位于相邻区域的比例 (0~1)。CSharp_AkAuxSendValueProxy_set 只是一个实现 helper (一个属性的 mutator),所有 CSharp_ 打头的方法都是 C++ 原生 SDK 的绑定 helper,是 SWIG 自动生成的,不用纠结,可以看作 黑盒。最新版本(2017.1)的实现里面这个 helper 已经 inline 了。供用户使用的 API 都在 Wwise/Deployment//API 和 Components 下面。

  集成包里的  GetAuxSendValueForPosition() 没有官方实现 ,只是一个 stub。所以只返回 1 (代表任何输入都被认为属于这个 AuxSend 区域),如果你需要根据位置判断,很遗憾需要自行实现一下,大致的意思跟上面说的一样,在考虑区域重合的情况下返回一个区域归属比例即可。

 

2. 同理 “CSharp_” 打头的 CSharp_SetGameObjectAuxSendValues 以及内部成员 m_Buffer 应该是不需要你去碰的,只要通过 EnvID (区域 ID) 和 fValue 来操作 AuxSendArray 即可。集成会在内部实现中将 EnvID 和 fValue 打包成 m_Buffer 操作。
answered Mar 23, 2017 by Beinan L. (Audiokinetic) (1,180 points)
...