我正在开发在两个 android 设备之间进行直播的应用程序。我已经得到了很好的结果,比如连接、视频流。但我对声音质量不满意,声音中有如此多的回声和噪音。这就是我使用音轨的方式
localMS = factory.createLocalMediaStream("ARDAMS");
if(pcParams.videoCallEnabled)
{
MediaConstraints videoConstraints = new MediaConstraints();
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxHeight", height));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxWidth", width));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("maxFrameRate", Integer.toString(pcParams.videoFps)));
videoConstraints.mandatory.add(new MediaConstraints.KeyValuePair("minFrameRate", Integer.toString(pcParams.videoFps)));
videoSource = factory.createVideoSource(getVideoCapturer(), videoConstraints);
localMS.addTrack(factory.createVideoTrack("ARDAMSv0", videoSource));
}
AudioSource audioSource = factory.createAudioSource(new MediaConstraints());
localMS.addTrack(factory.createAudioTrack("ARDAMSa0", audioSource));
mListener.onLocalStream(localMS);
所以我正在寻找消除回声和噪声消除的方法。任何帮助和指导将不胜感激。