•建立一个音频库
•接口
AudioHardwareInterface充当专有音频driver和Android AudioFlinger服务之间的连接体,Audio server的核心即处理来自应用程序的所有音频相关要求。
<!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" style='width:405pt;
height:372pt'>
<v:imagedata src="file:///C:/DOCUME~1/johndeng/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" mce_src="file:///C:/DOCUME~1/johndeng/LOCALS~1/Temp/msohtml1/01/clip_image001.gif"
o:href="http://source.android.com/porting/images/android_audio_architecture.gif" />
</v:shape><![endif]-->
实线表示Android的块元素和虚线代表partner-specific组成部分。
建设一个音频库
为了实现一个音频驱动程序,创建一个共享库,实现了在AudioHardwareInterface.h定义的接口。您必须命名您的共享librarylibaudio.so,以便它会从/system/lib中在运行时加载。放置libaudio来源和Android.mk 在/vendor/acme/chipset_or_board/libaudio/。
下面的Android.mk文件,确保与libaudio编译和链接到相应的库:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libaudio
LOCAL_SHARED_LIBRARIES := /
libcutils /
libutils /
libmedia /
libhardware
LOCAL_SRC_FILES += MyAudioHardware.cpp
LOCAL_CFLAGS +=
LOCAL_C_INCLUDES +=
LOCAL_STATIC_LIBRARIES += libaudiointerface
include $(BUILD_SHARED_LIBRARY)
Interface:AudioHardwareInterface.h
分享到:
相关推荐
android porting guide
Embedded Android Porting, Extending, and Customizing 2013最新版
Embedded Android Porting Extending and Customizing Yaghmour 安卓底层平台移植指南,Karim Yaghmour 大神作品,O'REILLY 出版 很好的安卓底层移植,开发,和定制指南的英文书籍, ps:全英文版书籍,简略版,非...
Android Porting Guide关于Android移植方面的文档,感觉原文作者。
Embedded Android - Porting
Android Porting On Real Target
android wifi porting
a valuable book relating to porting and customizing of embedded android.
Android_Porting台湾 移植与研究实行.zip
to an Android platform from software perspective. It first explains how install the required kernel driver, then it describes step by step how to adapt the Android Open Source Project sources from the...
a general porting guide for android on embedded platforms
android 入门讲义,欢迎大家参考!
android_wifi_porting_eng.doc
这个真的经典,值得下载,Android的好资源!
This document give a guide line to how to porting embedded linux and Android to your new hardware.
Android_Porting移植与研究实行.zip Android_Porting移植与研究实行.zip Android_Porting移植与研究实行.zip Android_Porting移植与研究实行.zip Android_Porting移植与研究实行.zip Android_Porting移植与研究实行....
Android Kernel Porting 的简单总结文档 Android Kernel Porting 的简单总结文档
porting android
Android_Porting台湾 移植与研究实行