访问本机AudioRecord [英] Accessing Native AudioRecord

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

问题描述

我需要访问本机AudioRecord类,但它是不是通过标准的API暴露。

I need to access the native AudioRecord class, however it is not exposed via the standard API.

当我尝试编译code,其中包括AudioRecord.h使用NDK,它没有找到的头文件。我如何修改make文件指向的lib媒体目录和链路与libmedia.so?我已经下载并编制了Android源,我只是有麻烦浏览了Android构建系统。

When I attempt to compile code that includes AudioRecord.h using the NDK, it doesn't find the header files. How do I modify the make files to point to the lib media directories and link with libmedia.so? I have already downloaded and compiled the android source, I'm just having trouble navigating the android build system.

时所产生的应用程序将需要生根的设备?

Is the resulting app going to require rooting the device?

有没有人有在本地code。使用AudioRecord类的任何例子吗?

Does anyone have any examples of using the AudioRecord class in native code?

推荐答案

您必须添加与媒体/ AudioRecord.h目录中的Andr​​oid.mk文件LOCAL_C_INCLUDES和libmedia.so添加到LOCAL_LDLIBS。

You must add directory with media/AudioRecord.h to LOCAL_C_INCLUDES in Android.mk file and add libmedia.so to LOCAL_LDLIBS.

您可以在这里看到一个例子 HTTP ://$c$c.google.com/p/andless/source/browse/trunk/jni/Android.mk

You can see an example here http://code.google.com/p/andless/source/browse/trunk/jni/Android.mk

这篇关于访问本机AudioRecord的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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