Android的音频延迟解决方法 [英] Android Audio Latency Workarounds

查看:282
本文介绍了Android的音频延迟解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以任何称职的Andr​​oid开发社区知道问题3434关于在Android的低延迟音频。对于那些谁不这样做,你可以在这里教育自己。 <一href="http://$c$c.google.com/p/android/issues/detail?id=3434">http://$c$c.google.com/p/android/issues/detail?id=3434

So anybody worth their salt in the android development community knows about issue 3434 relating to low latency audio in Android. For those who don't, you can educate yourself here. http://code.google.com/p/android/issues/detail?id=3434

我在找我的个人项目的任何一种临时的解决办法的。我听人说暴露专用接口的NDK滚动你自己构建Android和修改NDK的。

I'm looking for any sort of temporary workaround for my personal project. I've heard tell of exposing private interfaces to the NDK by rolling your own build of android and modifying the NDK.

我需要的是一种方法来访问这些已经打包在标准2.2版本的低级别ALSA驱动。我想有直接发送到PCM音频硬件设备上的能力。我不在乎所产生的应用程序将不会分配了市场,并有可能不会与任何其他设备比我的运行。

All I need is a way to access the low level alsa drivers which are already packaged with the standard 2.2 build. I'd like to have the ability to send PCM directly to the audio hardware on my device. I don't care that the resulting app won't be distributable over the marketplace, and likely won't run with any other device than mine.

任何人有任何有益的想法?

Anybody have any useful ideas?

-Griff

编辑:我应该提到,我知道AudioTrack提供了这种功能,但我想非常低的延迟 - AudioTrack坐在身边300ms的,我喜欢的地方约20至30毫秒

I should mention, I know AudioTrack provides this functionality, but I'd like much lower latency -- AudioTrack sits around 300ms, I'd like somewhere around 20-30 ms.

推荐答案

稻,这只是问题的,NDK西港岛线不能提高已知的延迟问题(这是其记录)。在本土code中的硬件抽象层目前正在增加了延迟,所以它不只是访问底层驱动程序(顺便说一句,你不应该依赖于ALSA驱动在那里呢)。

Griff, that's just the problem, NDK wil not improve the known latency issue (that's even documented). The hardware abstraction layer in native code is currently adding to the latency, so it's not just about access to the low level drivers (btw you shouldn't rely on alsa drivers being there anyway).

这篇关于Android的音频延迟解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆