Capturing sound input with low latency in the browser

白昼怎懂夜的黑 提交于 2019-12-06 07:30:42

"Web Audio API latency was bad" ignores a lot of potential issues. Low latency nearly always needs some tweaking.

1) Latency is considerably lower (3ms or so, commonly) on OSX than on Windows (10ms or so common). It can be VERY high on Linux, mostly due to hardware tuning issues.

2) Latency can be tuned on most systems, but you are ALWAYS going to have latency in digital audio.

3) On OSX, at least, you can also reduce the latency by increasing the sample rate - it's ~3ms at 44.1kHz, but if you record at 88.2kHz it's half that. :)

I play and record guitar through web audio on my Mac, and find it completely acceptable. YMMV.

Oh, and ScriptProcessorNodes are very bad for keeping your latency low - it is far and away best if you can eliminate them from your audio path.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!