diff --git a/modules/audio_coding/test/TestVADDTX.cc b/modules/audio_coding/test/TestVADDTX.cc index 6c9b14ddb7..dce5433ed8 100644 --- a/modules/audio_coding/test/TestVADDTX.cc +++ b/modules/audio_coding/test/TestVADDTX.cc @@ -267,16 +267,15 @@ void TestOpusDtx::Perform() { acm_send_->ModifyEncoder([](std::unique_ptr* encoder_ptr) { (*encoder_ptr)->SetDtx(true); + // The default bitrate will not generate frames recognized as CN on desktop + // since the frames will be encoded as CELT. Set a low target bitrate to get + // consistent behaviour across platforms. + (*encoder_ptr)->OnReceivedTargetAudioBitrate(24000); }); expects[static_cast(AudioFrameType::kEmptyFrame)] = 1; expects[static_cast(AudioFrameType::kAudioFrameSpeech)] = 1; - // Android and iOS behave different with respect to the number of CN frames. -#if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) expects[static_cast(AudioFrameType::kAudioFrameCN)] = 1; -#else - expects[static_cast(AudioFrameType::kAudioFrameCN)] = 0; -#endif Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 32000, 2, out_filename, true, expects); }