Windows 8 - low latency audio

跟風遠走 提交于 2020-01-02 04:40:48

问题


I'm considering developing an app for the upcoming Windows 8. The app requires low-latency audio recording and playback, and I'm trying find out whether the OS will support that (as opposed to other platforms).

So what I'd like to know is:

  1. Is there a low-latency audio API in Windows 8?
  2. Will it be supported on platforms other than PC (e.g. tablets)?

Thanks!


回答1:


WASAPI was introduced with Windows Vista as the low-latency audio API. It is available both to desktop and to Metro style applications on Windows 8. Because it is a very low-level API, using it is not simple, but it gives you the most power. It will work on both Windows 8 and the newly-minted Windows RT (Arm).

Also available is XAudio2 which is a slightly higher-level API which will be easier to work with. It is the replacement for DirectSound and is designed for game developers, but may work for your purposes. This also is available to both Windows 8 and Windows RT.

There is a bit of comparison of the two APIs at the bottom of this article. I would start with XAudio2 and move to WASAPI only if you find XAudio2 doesn't meet your needs.




回答2:


I would consider using XAudio2. Microsoft providers Basic audio playback sample for easy start




回答3:


Yes, there is a low latency API you can access. It's called WASAPI

From my understanding, all tablets/Laptops/Desktops/anything running Windows 8, will have access to it. The only downside is that it's harder to work with (because it's lower level), but you get to directly interact with the byte arrays getting send to the speaker, and the latency is very low.



来源:https://stackoverflow.com/questions/10177477/windows-8-low-latency-audio

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