舒适噪音生成CNG(comfort noise generator)是一个在通话过程中出现短暂静音时用来为电话通信产生背景噪声的程序。
音频版本VoiceEngine 4.1.0
- 默认情况下andriod与ios会使用Aecm模式;
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)static const EcModes kDefaultEcMode = kEcAecm;#elsestatic const EcModes kDefaultEcMode = kEcAec;#endif
代码语言:javascript复制// EC modesenum EcModes // type of Echo Control{ kEcUnchanged = 0, // previously set mode kEcDefault, // platform default kEcConference, // conferencing default (aggressive AEC) kEcAec, // Acoustic Echo Cancellation kEcAecm, // AEC mobile};
SetAecmMode
接口
- 只需要将enableCNG为false即可屏蔽舒适噪音。
// Modifies settings for the AEC designed for mobile devices (AECM).virtual int SetAecmMode(AecmModes mode = kAecmSpeakerphone, bool enableCNG = true) = 0;