diff options
author | Philipp Hancke <philipp.hancke@googlemail.com> | 2020-07-16 17:22:03 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-17 11:43:45 +0000 |
commit | fc4668dae26e1c9ad40eb75919e7e733251fda4b (patch) | |
tree | 3beb6feef353b9e8b3d063f913f16db43d51628a /modules/audio_coding | |
parent | b9d3809418888a78b5542c7b97bf4ae0eea4dbb9 (diff) | |
download | webrtc-fc4668dae26e1c9ad40eb75919e7e733251fda4b.tar.gz |
configure target bitrate in opus dtx tests
This avoids a difference in behaviour between mobile and
desktop platforms since the bitrate is now too low for
CELT mode.
BUG=webrtc:11643
Change-Id: I9ac1439bea0ccbbfee7388516932e30d6cb06bf4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179522
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#31757}
Diffstat (limited to 'modules/audio_coding')
-rw-r--r-- | modules/audio_coding/test/TestVADDTX.cc | 9 |
1 files changed, 4 insertions, 5 deletions
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<AudioEncoder>* 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<int>(AudioFrameType::kEmptyFrame)] = 1; expects[static_cast<int>(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<int>(AudioFrameType::kAudioFrameCN)] = 1; -#else - expects[static_cast<int>(AudioFrameType::kAudioFrameCN)] = 0; -#endif Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 32000, 2, out_filename, true, expects); } |