The sound quality of Android has been plagued and criticized by everyone, there are many reasons,
Here is a previous UC peer email with me to communicate some of the records, for reference, support the original, the article from the blog Park Rtc.blacker, reproduced please explain the source.
The following text is from the mail, for easy reading and understanding, a little collation:
"Blacker, hello, I have been engaged in the processing and research of audio and video algorithms, including H264 video, speech suppression, echo cancellation, noise processing and other branches. Has recently turned to WEBRTC, and WEBRTC is relatively familiar with. But when I was using the WEBRTC module to develop, I encountered an audio acquisition problem. Don't know if you have met, whether you have the relevant treatment method.
WebRTC in the PC and iOS phone, the effect can be said to be very good, but on the Android phone side, the effect is not how, the voice is intermittent, the effect is poor, one of the factors is caused by the AECM and AGC, noise elimination and other modules caused by the I have also carefully studied the underlying ROM of these algorithms, and found that the following algorithm in many places the initial value is to take an empirical value, the size of these values affect the final effect, no wonder the effect of apple and PC devices is so good, because these XP is probably for the PC and Apple phone. Due to the wide variety of Android phone devices, different device speakers and microphones cause different effects.
Of course, I can also modify the underlying speech algorithm to optimize, but the Android side, there is a problem I always have no clue, is the audio part of the acquisition problem. Basically all Android phones, the collected audio data is incomplete, occasionally intermittent, coupled with the subsequent processing of audio, after processing the effect is even worse. The bottom of the audio collection, with the opensles to achieve, of course, he also provided a callback upper Java to achieve the collection of modules, with a switch webrtc_android_opensles can be opened, these bottom-level acquisition of the voice is problematic.
With WEBRTC self-contained webrtcdemo can be tested out, especially when the video is turned off, only the audio, the problem is more obvious. Capture part of the code I have seen, there is a buffer size setting, the adjustment is not very useful after the big. Of course, I also write a separate demo to test, if I do not call startreceive and startplayout, but just call Startsend, the acquisition of the audio is very complete, the effect is very good, the first two just opened the receiving listening and playing thread, It and startsend open the acquisition thread is irrelevant at all, why it affects each other.
So I sometimes wonder if there's a problem with WEBRTC's architecture?
This question has been no clue, you in WEBRTC contact than I long, experience more than I rich, contact cattle people also much more, I want to ask you how to deal with the bottom of the sound collection problem, as long as the problem solved, Android phone side audio effect will increase by more than 50%, That's a qualitative leap. Look forward to your reply, discuss how to solve this problem, thank you. "
------------------------------------------------here is my reply:
"Hello, your question description is very detailed, the analysis is also very accurate, shows you in this aspect indeed quite studies .
back to the problem of poor Android audio, first put aside the defects in the design of mobile phone hardware, mainly related to the variety of Android devices, so webrtc inside some of the parameters are experience values, so that the effect of different mobile phones are not the same, So adapting this piece is a big job, so the best thing is to do a specific adaptation for each device, calculate the specific values, this will be more accurate, but this investment is very large.are you currently only using Webrtcdemo test? You feedback this I did not get, because generally with webrtcdemo will rewrite the transmission module, another attachment sent an apk to you test, you can use him and webrtcdemo comparison, The main difference between them is that the transmission module is different. In addition to this question I also asked my friend.The test apk is described in the attachment, slightly later... " ------------------------------------------------followed by a succession of mail exchanges, summarized as follows:"Behind the other side with the Doubango inside the collection module replaced the WEBRTC inside the collection module, the test found that the collection and playback are very smooth, with the APK I provided testing is also very smooth, we can only speculate that the transmission mechanism is actually related, But why the transmission will affect the smoothness of the sound quality we do not understand, and WEBRTC collection and playback with a lot of multi-threading, lock, it seems very complex, it is difficult to maintain. Of course, I also talk about some business and job-related things, because it is not relevant to the theme, so it is not listed. "
Android IOS WebRTC Audio Video Development Summary (29)