社区问答

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

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

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

0 投票
分类:General Discussion | 用户: Guillaume R. (Audiokinetic) (11.6k 分)

1个回答

0 投票

There is currently no built-in Doppler effect in Wwise. You can however create Doppler type effects by applying RTPC (Real Time Parameter Control) to the pitch of a Wwise objectcontained within the Actor Mixer Hierarchy, based on the relative speed of the game objectand the listener.

The rate at which the object is approaching/leaving must be computed by your game and fed to the sound engine via AK::SoundEngine::SetRTPC(). This value is used as the X axis in your RTPC curve in Wwise. This curve must be arranged so that:

  • When the distance between the listener and the object is not changing over time, pitch is not be affected
  • When the distance is decreasing over time, pitch is increased proportionally with the rate at which the distance is decreasing
  • When the distance is increasing over time, pitch is decreased proportionally with the rate at which the distance is increasing

Note that if the object is on a trajectory that comes very close to the listener, the change between "the distance is decreasing" and "the distance is increasing" will be very sudden, and the pitch shift will go from positive to negative very quickly, producing an unpleasant effect. You may need to "smooth" the Game Parameter value based on distance: This game parameter would be the rate at which the object is approaching/leaving the listener, but would be gradually brought nearer to the neutral position when the game object is getting close to the listener.

The pitch node used in the Wwise Sound Engine pipeline has been highly optimized for re-sampling, allowing for playback to be sped up or slowed down in real time. This is by far the least CPU intensive procedure for creating Doppler effects. 

Considerations 
When multiple listeners (including split screen) are used in Wwise, Doppler effects using pitch require special design considerations. In real-life, the sound may result in a different pitch value for each listener based on the velocity between the game object and each listener. Since in Wwise game objects use a single instance for each playing sound, having two unique pitch values for a single sound is not possible. Therefore, a single pitch value needs to be determined programmatically.

Another, more costly alternative is to duplicate game objects -- for example a split-screen racing game could create 2 game objects for each car, play sounds on both game objects, and compute the speed of the car relative to each listener. This may produce undesired effects if both listeners are played through the same speakers, but if listeners are playing through different speakers (using AK::SoundEngine::SetListenerSpatialization()) then it should be Ok.

用户: Guillaume R. (Audiokinetic) (11.6k 分)
Since you can connect an RTPC to distance I'm assuming that the information on distance between a given listener and a given emitter is already known by the sound engine and you could look them up each frame.

These informations seem to be stored in a AkEmitterListenerPair, but the only getters I can find for that, GetEmitterListenerPair and Get3DPosition seem to be for use inside plugins and not the engine itself.

Am I missing something ?
...