PCM -> AAC (Encoder) -> PCM(Decoder) in real-time with correct optimization

前端 未结 6 692
野趣味
野趣味 2020-11-29 17:37

I\'m trying to implement

AudioRecord (MIC) ->

PCM -> AAC Encoder
AAC -> PCM Decode

-> AudioTrack??  (SPEAKER)

with Me

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 18:35

    I have tested with your souce. there are some points.

    1. Bit Rate is a natural number of K, but not computer K. 64k = 64000, but not 64 * 1024

    2. It's not recommended to write a long code that shares some variables. A. separate Encoder Thread and Decoder Thread into 2 independet classes. B. The DatagramSocket is shared by Sender and Receiver, it not good.

    3. Enumerate Audio Format need more values. i.e. sample rates should be picked from : 8000, 11025, 22050, 44100

提交回复
热议问题