When making a voip call with BT ,the sound of maker would berecorded into the phone and send to the receiver, at the same time,the sound of receiver would come from the BT.

That is to say, we could divide the whole progress intorecording and tracking.

Recording and tracking are the progress of opposite, thefollowing sequence diagram is tracking, to see audio record sequencediagram, we only need to change output to Input ,AudioTrack to AudioRecord and TrackHandler toRecordHandler.


The number descript as belw,

1,after request audio focus, it can record or track,

6,7,8,at these steps, it can check routing, device etc.,like checking and setting BT or earpiece is used, the callstate and the callis a voip call or a real call,

10, openOutput to AudioFlinger would cause AudioFlingerto create work thread like MixerThread,

11,open output stream, in_read or out_write inaudio_hw.c,

12,get mixer thread for audio track, actually, I thinkthe record thread don’t need this step,

13,add the next audio thread into playback thread,

14,return the next audio track thread id with deviceinfo,

15,according to the receiving thread id, AudioTrack wouldcall method creatTrack(),and AudioFlinger would create the track in the giventhread id,

16,there are two more steps before this, PlaybackThread*thread = checkPlaybackThread_I (output), mClients.add(pid,client),AudioTrackand AudioRecord progress are AudioFlinger’s client, and all client progress ismarked by progress pid,

17,18, AudioHandle is server side of the client'sIAudioTrack, at the same time, RecordHande is to IAudioRecord, TrackHandlerextends BnAudioTrack and RecordHandle extends BnAudioRecord they are based onBinder communication,

19,AudioTrack would send the audio data to the upperthread,and the thread finally write data into shared memory.




another picture of audio track sequence


更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android 金额输入限制,EditText保留两位小
  2. Android onActivityResult传值
  3. Jenkins android集成遇到的问题
  4. 我的Android进阶之旅------>android Matr
  5. Android学习笔记之ProgressDialog
  6. Android 广播
  7. Theme.Holo主题 中tab同时显示图片和文字
  8. Android接收信息操作
  9. [android]XML中元素(element)和标签(tag)
  10. android api 23 网络jar包问题