Setting OPUS_SIGNAL_VOICE when enable DTX.
A better solution than forcing OPUS_APPLICATION_VOIP when enabling DTX has been found, which is to set OPUS_SIGNAL_VOICE. This reduces the uncertainty of entering DTX over silence period of audio. This CL contains the setup of OPUS_SIGNAL_VOICE and decoupling opus application mode with DTX. BUG=4559 R=henrik.lundin@webrtc.org, henrika@webrtc.org Review URL: https://webrtc-codereview.appspot.com/46959004 Cr-Commit-Position: refs/heads/master@{#9168}
This commit is contained in:
@ -239,7 +239,7 @@ void TestOpusDtx::Perform() {
|
||||
#ifdef WEBRTC_CODEC_ISAC
|
||||
// If we set other codec than Opus, DTX cannot be toggled.
|
||||
RegisterCodec(kIsacWb);
|
||||
EXPECT_EQ(-1, acm_send_->EnableOpusDtx(false));
|
||||
EXPECT_EQ(-1, acm_send_->EnableOpusDtx());
|
||||
EXPECT_EQ(-1, acm_send_->DisableOpusDtx());
|
||||
#endif
|
||||
|
||||
@ -255,7 +255,7 @@ void TestOpusDtx::Perform() {
|
||||
Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
|
||||
32000, 1, out_filename, false, expects);
|
||||
|
||||
EXPECT_EQ(0, acm_send_->EnableOpusDtx(false));
|
||||
EXPECT_EQ(0, acm_send_->EnableOpusDtx());
|
||||
expects[kFrameEmpty] = 1;
|
||||
Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"),
|
||||
32000, 1, out_filename, true, expects);
|
||||
@ -268,10 +268,7 @@ void TestOpusDtx::Perform() {
|
||||
Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"),
|
||||
32000, 2, out_filename, false, expects);
|
||||
|
||||
// Opus should be now in kAudio mode. Opus DTX should not be set without
|
||||
// forcing kVoip mode.
|
||||
EXPECT_EQ(-1, acm_send_->EnableOpusDtx(false));
|
||||
EXPECT_EQ(0, acm_send_->EnableOpusDtx(true));
|
||||
EXPECT_EQ(0, acm_send_->EnableOpusDtx());
|
||||
|
||||
expects[kFrameEmpty] = 1;
|
||||
Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"),
|
||||
|
||||
Reference in New Issue
Block a user