niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
andrew@webrtc.org | 63a5098 | 2012-05-02 23:56:37 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "modules/audio_coding/test/TestVADDTX.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 12 | |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 13 | #include <string> |
kjellander@webrtc.org | 5490c71 | 2011-12-21 13:34:18 +0000 | [diff] [blame] | 14 | |
Karl Wiberg | 5817d3d | 2018-04-06 10:06:42 +0200 | [diff] [blame] | 15 | #include "api/audio_codecs/builtin_audio_decoder_factory.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 16 | #include "modules/audio_coding/codecs/audio_format_conversion.h" |
| 17 | #include "modules/audio_coding/test/PCMFile.h" |
| 18 | #include "modules/audio_coding/test/utility.h" |
| 19 | #include "test/testsupport/fileutils.h" |
Mirko Bonadei | 7120742 | 2017-09-15 13:58:09 +0200 | [diff] [blame] | 20 | #include "typedefs.h" // NOLINT(build/include) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 21 | |
tina.legrand@webrtc.org | 554ae1a | 2011-12-16 10:09:04 +0000 | [diff] [blame] | 22 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 23 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 24 | #ifdef WEBRTC_CODEC_ISAC |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 25 | const CodecInst kIsacWb = {103, "ISAC", 16000, 480, 1, 32000}; |
| 26 | const CodecInst kIsacSwb = {104, "ISAC", 32000, 960, 1, 56000}; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 27 | #endif |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 28 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 29 | #ifdef WEBRTC_CODEC_ILBC |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 30 | const CodecInst kIlbc = {102, "ILBC", 8000, 240, 1, 13300}; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 31 | #endif |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 32 | |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 33 | #ifdef WEBRTC_CODEC_OPUS |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 34 | const CodecInst kOpus = {120, "opus", 48000, 960, 1, 64000}; |
| 35 | const CodecInst kOpusStereo = {120, "opus", 48000, 960, 2, 64000}; |
tina.legrand@webrtc.org | a7d8387 | 2012-10-18 10:00:52 +0000 | [diff] [blame] | 36 | #endif |
tina.legrand@webrtc.org | 554ae1a | 2011-12-16 10:09:04 +0000 | [diff] [blame] | 37 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 38 | ActivityMonitor::ActivityMonitor() { |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 39 | ResetStatistics(); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 40 | } |
| 41 | |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 42 | int32_t ActivityMonitor::InFrameType(FrameType frame_type) { |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 43 | counter_[frame_type]++; |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 44 | return 0; |
| 45 | } |
| 46 | |
tina.legrand@webrtc.org | ee92b66 | 2013-08-27 07:33:51 +0000 | [diff] [blame] | 47 | void ActivityMonitor::PrintStatistics() { |
| 48 | printf("\n"); |
pbos | 22993e1 | 2015-10-19 02:39:06 -0700 | [diff] [blame] | 49 | printf("kEmptyFrame %u\n", counter_[kEmptyFrame]); |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 50 | printf("kAudioFrameSpeech %u\n", counter_[kAudioFrameSpeech]); |
| 51 | printf("kAudioFrameCN %u\n", counter_[kAudioFrameCN]); |
| 52 | printf("kVideoFrameKey %u\n", counter_[kVideoFrameKey]); |
| 53 | printf("kVideoFrameDelta %u\n", counter_[kVideoFrameDelta]); |
tina.legrand@webrtc.org | ee92b66 | 2013-08-27 07:33:51 +0000 | [diff] [blame] | 54 | printf("\n\n"); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | void ActivityMonitor::ResetStatistics() { |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 58 | memset(counter_, 0, sizeof(counter_)); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 59 | } |
| 60 | |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 61 | void ActivityMonitor::GetStatistics(uint32_t* counter) { |
| 62 | memcpy(counter, counter_, sizeof(counter_)); |
| 63 | } |
| 64 | |
| 65 | TestVadDtx::TestVadDtx() |
Karl Wiberg | 5817d3d | 2018-04-06 10:06:42 +0200 | [diff] [blame] | 66 | : acm_send_(AudioCodingModule::Create( |
| 67 | AudioCodingModule::Config(CreateBuiltinAudioDecoderFactory()))), |
| 68 | acm_receive_(AudioCodingModule::Create( |
| 69 | AudioCodingModule::Config(CreateBuiltinAudioDecoderFactory()))), |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 70 | channel_(new Channel), |
| 71 | monitor_(new ActivityMonitor) { |
| 72 | EXPECT_EQ(0, acm_send_->RegisterTransportCallback(channel_.get())); |
| 73 | channel_->RegisterReceiverACM(acm_receive_.get()); |
| 74 | EXPECT_EQ(0, acm_send_->RegisterVADCallback(monitor_.get())); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | void TestVadDtx::RegisterCodec(CodecInst codec_param) { |
| 78 | // Set the codec for sending and receiving. |
| 79 | EXPECT_EQ(0, acm_send_->RegisterSendCodec(codec_param)); |
kwiberg | da2bf4e | 2016-10-24 13:47:09 -0700 | [diff] [blame] | 80 | EXPECT_EQ(true, acm_receive_->RegisterReceiveCodec( |
| 81 | codec_param.pltype, CodecInstToSdp(codec_param))); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 82 | channel_->SetIsStereo(codec_param.channels > 1); |
| 83 | } |
| 84 | |
| 85 | // Encoding a file and see if the numbers that various packets occur follow |
| 86 | // the expectation. |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 87 | void TestVadDtx::Run(std::string in_filename, |
| 88 | int frequency, |
| 89 | int channels, |
| 90 | std::string out_filename, |
| 91 | bool append, |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 92 | const int* expects) { |
| 93 | monitor_->ResetStatistics(); |
| 94 | |
| 95 | PCMFile in_file; |
| 96 | in_file.Open(in_filename, frequency, "rb"); |
| 97 | in_file.ReadStereo(channels > 1); |
Henrik Lundin | 4d68208 | 2015-12-10 16:24:39 +0100 | [diff] [blame] | 98 | // Set test length to 1000 ms (100 blocks of 10 ms each). |
| 99 | in_file.SetNum10MsBlocksToRead(100); |
| 100 | // Fast-forward both files 500 ms (50 blocks). The first second of the file is |
| 101 | // silence, but we want to keep half of that to test silence periods. |
| 102 | in_file.FastForward(50); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 103 | |
| 104 | PCMFile out_file; |
| 105 | if (append) { |
| 106 | out_file.Open(out_filename, kOutputFreqHz, "ab"); |
| 107 | } else { |
| 108 | out_file.Open(out_filename, kOutputFreqHz, "wb"); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 109 | } |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 110 | |
| 111 | uint16_t frame_size_samples = in_file.PayloadLength10Ms(); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 112 | AudioFrame audio_frame; |
| 113 | while (!in_file.EndOfFile()) { |
| 114 | in_file.Read10MsData(audio_frame); |
ossu | 63fb95a | 2016-07-06 09:34:22 -0700 | [diff] [blame] | 115 | audio_frame.timestamp_ = time_stamp_; |
| 116 | time_stamp_ += frame_size_samples; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 117 | EXPECT_GE(acm_send_->Add10MsData(audio_frame), 0); |
henrik.lundin | d4ccb00 | 2016-05-17 12:21:55 -0700 | [diff] [blame] | 118 | bool muted; |
| 119 | acm_receive_->PlayoutData10Ms(kOutputFreqHz, &audio_frame, &muted); |
| 120 | ASSERT_FALSE(muted); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 121 | out_file.Write10MsData(audio_frame); |
| 122 | } |
| 123 | |
| 124 | in_file.Close(); |
| 125 | out_file.Close(); |
| 126 | |
| 127 | #ifdef PRINT_STAT |
| 128 | monitor_->PrintStatistics(); |
| 129 | #endif |
| 130 | |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 131 | uint32_t stats[5]; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 132 | monitor_->GetStatistics(stats); |
| 133 | monitor_->ResetStatistics(); |
| 134 | |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 135 | for (const auto& st : stats) { |
| 136 | int i = &st - stats; // Calculate the current position in stats. |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 137 | switch (expects[i]) { |
| 138 | case 0: { |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 139 | EXPECT_EQ(0u, st) << "stats[" << i << "] error."; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 140 | break; |
| 141 | } |
| 142 | case 1: { |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 143 | EXPECT_GT(st, 0u) << "stats[" << i << "] error."; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 144 | break; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | // Following is the implementation of TestWebRtcVadDtx. |
| 151 | TestWebRtcVadDtx::TestWebRtcVadDtx() |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 152 | : vad_enabled_(false), dtx_enabled_(false), output_file_num_(0) {} |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 153 | |
| 154 | void TestWebRtcVadDtx::Perform() { |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 155 | // Go through various test cases. |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 156 | #ifdef WEBRTC_CODEC_ISAC |
| 157 | // Register iSAC WB as send codec |
| 158 | RegisterCodec(kIsacWb); |
| 159 | RunTestCases(); |
| 160 | |
| 161 | // Register iSAC SWB as send codec |
| 162 | RegisterCodec(kIsacSwb); |
| 163 | RunTestCases(); |
| 164 | #endif |
| 165 | |
| 166 | #ifdef WEBRTC_CODEC_ILBC |
| 167 | // Register iLBC as send codec |
| 168 | RegisterCodec(kIlbc); |
| 169 | RunTestCases(); |
| 170 | #endif |
| 171 | |
| 172 | #ifdef WEBRTC_CODEC_OPUS |
| 173 | // Register Opus as send codec |
| 174 | RegisterCodec(kOpus); |
| 175 | RunTestCases(); |
| 176 | #endif |
| 177 | } |
| 178 | |
| 179 | // Test various configurations on VAD/DTX. |
| 180 | void TestWebRtcVadDtx::RunTestCases() { |
| 181 | // #1 DTX = OFF, VAD = OFF, VADNormal |
| 182 | SetVAD(false, false, VADNormal); |
| 183 | Test(true); |
| 184 | |
| 185 | // #2 DTX = ON, VAD = ON, VADAggr |
| 186 | SetVAD(true, true, VADAggr); |
| 187 | Test(false); |
| 188 | |
| 189 | // #3 DTX = ON, VAD = ON, VADLowBitrate |
| 190 | SetVAD(true, true, VADLowBitrate); |
| 191 | Test(false); |
| 192 | |
| 193 | // #4 DTX = ON, VAD = ON, VADVeryAggr |
| 194 | SetVAD(true, true, VADVeryAggr); |
| 195 | Test(false); |
| 196 | |
| 197 | // #5 DTX = ON, VAD = ON, VADNormal |
| 198 | SetVAD(true, true, VADNormal); |
| 199 | Test(false); |
| 200 | } |
| 201 | |
| 202 | // Set the expectation and run the test. |
| 203 | void TestWebRtcVadDtx::Test(bool new_outfile) { |
Karl Wiberg | dd00f11 | 2015-08-25 09:37:04 +0200 | [diff] [blame] | 204 | int expects[] = {-1, 1, dtx_enabled_, 0, 0}; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 205 | if (new_outfile) { |
| 206 | output_file_num_++; |
| 207 | } |
| 208 | std::stringstream out_filename; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 209 | out_filename << webrtc::test::OutputPath() << "testWebRtcVadDtx_outFile_" |
| 210 | << output_file_num_ << ".pcm"; |
| 211 | Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), 32000, 1, |
| 212 | out_filename.str(), !new_outfile, expects); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 213 | } |
| 214 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 215 | void TestWebRtcVadDtx::SetVAD(bool enable_dtx, |
| 216 | bool enable_vad, |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 217 | ACMVADMode vad_mode) { |
| 218 | ACMVADMode mode; |
| 219 | EXPECT_EQ(0, acm_send_->SetVAD(enable_dtx, enable_vad, vad_mode)); |
| 220 | EXPECT_EQ(0, acm_send_->VAD(&dtx_enabled_, &vad_enabled_, &mode)); |
| 221 | |
kwiberg | 1fd4a4a | 2015-11-03 11:20:50 -0800 | [diff] [blame] | 222 | auto codec_param = acm_send_->SendCodec(); |
| 223 | ASSERT_TRUE(codec_param); |
| 224 | if (STR_CASE_CMP(codec_param->plname, "opus") == 0) { |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 225 | // If send codec is Opus, WebRTC VAD/DTX cannot be used. |
| 226 | enable_dtx = enable_vad = false; |
| 227 | } |
| 228 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 229 | EXPECT_EQ(dtx_enabled_, enable_dtx); // DTX should be set as expected. |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 230 | |
Karl Wiberg | dd00f11 | 2015-08-25 09:37:04 +0200 | [diff] [blame] | 231 | if (dtx_enabled_) { |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 232 | EXPECT_TRUE(vad_enabled_); // WebRTC DTX cannot run without WebRTC VAD. |
Karl Wiberg | dd00f11 | 2015-08-25 09:37:04 +0200 | [diff] [blame] | 233 | } else { |
| 234 | // Using no DTX should not affect setting of VAD. |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 235 | EXPECT_EQ(enable_vad, vad_enabled_); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | // Following is the implementation of TestOpusDtx. |
| 240 | void TestOpusDtx::Perform() { |
minyue@webrtc.org | e16bfde | 2015-03-12 15:28:41 +0000 | [diff] [blame] | 241 | #ifdef WEBRTC_CODEC_ISAC |
kwiberg | 4430763 | 2015-12-16 06:24:05 -0800 | [diff] [blame] | 242 | // If we set other codec than Opus, DTX cannot be switched on. |
minyue@webrtc.org | e16bfde | 2015-03-12 15:28:41 +0000 | [diff] [blame] | 243 | RegisterCodec(kIsacWb); |
Minyue Li | 092041c | 2015-05-11 12:19:35 +0200 | [diff] [blame] | 244 | EXPECT_EQ(-1, acm_send_->EnableOpusDtx()); |
kwiberg | 4430763 | 2015-12-16 06:24:05 -0800 | [diff] [blame] | 245 | EXPECT_EQ(0, acm_send_->DisableOpusDtx()); |
minyue@webrtc.org | e16bfde | 2015-03-12 15:28:41 +0000 | [diff] [blame] | 246 | #endif |
| 247 | |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 248 | #ifdef WEBRTC_CODEC_OPUS |
henrik.lundin@webrtc.org | e9217b4 | 2015-03-06 07:50:34 +0000 | [diff] [blame] | 249 | int expects[] = {0, 1, 0, 0, 0}; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 250 | |
| 251 | // Register Opus as send codec |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 252 | std::string out_filename = |
| 253 | webrtc::test::OutputPath() + "testOpusDtx_outFile_mono.pcm"; |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 254 | RegisterCodec(kOpus); |
| 255 | EXPECT_EQ(0, acm_send_->DisableOpusDtx()); |
| 256 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 257 | Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), 32000, 1, |
| 258 | out_filename, false, expects); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 259 | |
Minyue Li | 092041c | 2015-05-11 12:19:35 +0200 | [diff] [blame] | 260 | EXPECT_EQ(0, acm_send_->EnableOpusDtx()); |
pbos | 22993e1 | 2015-10-19 02:39:06 -0700 | [diff] [blame] | 261 | expects[kEmptyFrame] = 1; |
Gustaf Ullberg | 36de62e | 2017-11-20 14:55:41 +0100 | [diff] [blame] | 262 | expects[kAudioFrameCN] = 1; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 263 | Run(webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"), 32000, 1, |
| 264 | out_filename, true, expects); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 265 | |
| 266 | // Register stereo Opus as send codec |
| 267 | out_filename = webrtc::test::OutputPath() + "testOpusDtx_outFile_stereo.pcm"; |
| 268 | RegisterCodec(kOpusStereo); |
| 269 | EXPECT_EQ(0, acm_send_->DisableOpusDtx()); |
pbos | 22993e1 | 2015-10-19 02:39:06 -0700 | [diff] [blame] | 270 | expects[kEmptyFrame] = 0; |
Gustaf Ullberg | 36de62e | 2017-11-20 14:55:41 +0100 | [diff] [blame] | 271 | expects[kAudioFrameCN] = 0; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 272 | Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 32000, |
| 273 | 2, out_filename, false, expects); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 274 | |
Minyue Li | 092041c | 2015-05-11 12:19:35 +0200 | [diff] [blame] | 275 | EXPECT_EQ(0, acm_send_->EnableOpusDtx()); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 276 | |
pbos | 22993e1 | 2015-10-19 02:39:06 -0700 | [diff] [blame] | 277 | expects[kEmptyFrame] = 1; |
Gustaf Ullberg | 36de62e | 2017-11-20 14:55:41 +0100 | [diff] [blame] | 278 | expects[kAudioFrameCN] = 1; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 279 | Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 32000, |
| 280 | 2, out_filename, true, expects); |
minyue@webrtc.org | 0561716 | 2015-03-03 12:02:30 +0000 | [diff] [blame] | 281 | #endif |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | } // namespace webrtc |