使用WebRTC Android回音 [英] Echo in sound with WebRTC Android

查看:111
本文介绍了使用WebRTC Android回音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WebRTC在两个Android设备之间进行实时直播.有时,对于某些用户,声音中会出现回声.我在两端都使用免提(扬声器).

I am doing live stream between two Android devices with WebRTC. Sometimes, with some users, there is echo in sound. I use hands-free (speaker) on both end.

那么我该如何删除回声?也许我的代码做错了什么?

So how can I remove the echo? Maybe I did something wrong in my code?

推荐答案

在使用WhatsApp时,我将首先尝试检查回声是否也存在.如果是这样,则回声与设备有关,可能很难修复.

I would first try to check if the echo is also there when using WhatsApp. If it is, the echo is related to the device and probably difficult to fix.

如果不是,则可能与音频模式有关.建立通话后,请确保将音频模式设置为 MODE_IN_COMMUNICATION :

If not, it could be related to the audio mode. Make sure to set the audio mode to MODE_IN_COMMUNICATION when the call is established:

AudioManager am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
am.setMode(AudioManager.MODE_IN_COMMUNICATION);

这篇关于使用WebRTC Android回音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆