Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

+1 vote
请问一下,Wwise在ios和安卓平台,理论上支持的最低播放延迟是多少ms呢,如何优化到最低延迟。谢谢
in General Discussion by 宏建 (140 points)

1 Answer

0 votes
 
Best answer

Hi 钟老师,

您好,

对于您的问题,

您可参看下面的文档《控制Android上的延迟》:

https://www.audiokinetic.com/zh/library/edge/?source=SDK&id=pg_android_fastpath.html

影响延迟时间的参数有以下三个:

我们可以假设,项目采用以下设置:

uSampleRate = 48000Hz;

uNumSamplesPerFrame = 128(非常低,CPU会一直比较繁忙);

uNumRefillsInVoice = 2 (非常小,在大部分游戏中需要至少设置成3,通常为4,这样能为CPU占用变化留出余量,以免出现噪音)

根据延迟时间计算公式 (uNumSamplesPerFrame*uNumRefillsInVoice) / uSampleRate 可知

该设置下的理论延迟时间为(128*2)/48000=5.3ms,

若uNumSamplesPerFrame = 256,

或不改变uNumSamplesPerFrame的情况下增加缓冲区数量至4,

理论延迟时间也仅约为10.6ms。

由此您可知,

若所使用设备的性能允许,

使用Wwise是可以获得极低的延迟时间的。

 

需要注意的例外情况:

蓝牙设备不支持低延迟,

也不支持使用快速路径。

实际上,

为了在蓝牙设备上拥有无故障的音频,

缓冲必须更高,

每一帧也必须更大。

Wwise将会检测蓝牙耳机的占用,

并且会自动重置音频硬件来得到长度为8192个采样点的延迟,

大约180ms。

 

希望以上回答对您有所帮助

by Hou Chenzhong (Audiokinetic) (6.0k points)
...