转自
http://blog.sina.com.cn/foreverlovelost
AudioTrack is the hardware audio sink. AudioSink is used forin-memory
decode and potentially other applications where output doesn'tgo
straight to hardware.
AudioTrack是硬件音频接收器,AudioSink用于内存解码或者可能的其他应用程序他们的输出并不直接输出到硬件中去。
如果您要问这个audioSink的来源,那就要追溯到mediaplayerservice::Clinet里面的setDataSource了,
相关代码如下:
sp<MediaPlayerBase> p =createPlayer(playerType);
if (!p->hardwareOutput()) {
这个P就是返回给客户端的那个player,所以audiosink来自于此,其它的逻辑和视频差不多,也是创建了一个MIO,并且调用mPlayer的AddDataSink加入到datapathlist里面去了