blob: ef4c235e6e31ee9e889bd8d11b9112f5ad858a78 [file] [log] [blame]
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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
11// Test to verify correct stereo and multi-channel operation.
12
henrik.lundin@webrtc.orgbe50ab62014-03-04 15:10:03 +000013#include <algorithm>
Yves Gerey665174f2018-06-19 15:03:05 +020014#include <list>
kwiberg2d0c3322016-02-14 09:28:33 -080015#include <memory>
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000016#include <string>
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000017
Fredrik Solenbergbbf21a32018-04-12 22:44:09 +020018#include "api/audio/audio_frame.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020019#include "api/audio_codecs/builtin_audio_decoder_factory.h"
Mirko Bonadei71207422017-09-15 13:58:09 +020020#include "common_types.h" // NOLINT(build/include)
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020021#include "modules/audio_coding/codecs/pcm16b/pcm16b.h"
22#include "modules/audio_coding/neteq/include/neteq.h"
23#include "modules/audio_coding/neteq/tools/input_audio_file.h"
24#include "modules/audio_coding/neteq/tools/rtp_generator.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020025#include "test/gtest.h"
26#include "test/testsupport/fileutils.h"
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000027
28namespace webrtc {
29
30struct TestParameters {
31 int frame_size;
32 int sample_rate;
Peter Kasting69558702016-01-12 16:26:35 -080033 size_t num_channels;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000034};
35
36// This is a parameterized test. The test parameters are supplied through a
37// TestParameters struct, which is obtained through the GetParam() method.
38//
39// The objective of the test is to create a mono input signal and a
40// multi-channel input signal, where each channel is identical to the mono
41// input channel. The two input signals are processed through their respective
42// NetEq instances. After that, the output signals are compared. The expected
43// result is that each channel in the multi-channel output is identical to the
44// mono output.
45class NetEqStereoTest : public ::testing::TestWithParam<TestParameters> {
46 protected:
47 static const int kTimeStepMs = 10;
Peter Kastingdce40cf2015-08-24 14:52:23 -070048 static const size_t kMaxBlockSize = 480; // 10 ms @ 48 kHz.
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000049 static const uint8_t kPayloadTypeMono = 95;
50 static const uint8_t kPayloadTypeMulti = 96;
51
52 NetEqStereoTest()
53 : num_channels_(GetParam().num_channels),
54 sample_rate_hz_(GetParam().sample_rate),
55 samples_per_ms_(sample_rate_hz_ / 1000),
56 frame_size_ms_(GetParam().frame_size),
Peter Kastingdce40cf2015-08-24 14:52:23 -070057 frame_size_samples_(
58 static_cast<size_t>(frame_size_ms_ * samples_per_ms_)),
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000059 output_size_samples_(10 * samples_per_ms_),
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000060 rtp_generator_mono_(samples_per_ms_),
61 rtp_generator_(samples_per_ms_),
62 payload_size_bytes_(0),
63 multi_payload_size_bytes_(0),
64 last_send_time_(0),
65 last_arrival_time_(0) {
henrik.lundin@webrtc.org35ead382014-04-14 18:49:17 +000066 NetEq::Config config;
67 config.sample_rate_hz = sample_rate_hz_;
ossue3525782016-05-25 07:37:43 -070068 rtc::scoped_refptr<AudioDecoderFactory> factory =
69 CreateBuiltinAudioDecoderFactory();
70 neteq_mono_ = NetEq::Create(config, factory);
71 neteq_ = NetEq::Create(config, factory);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000072 input_ = new int16_t[frame_size_samples_];
73 encoded_ = new uint8_t[2 * frame_size_samples_];
74 input_multi_channel_ = new int16_t[frame_size_samples_ * num_channels_];
Yves Gerey665174f2018-06-19 15:03:05 +020075 encoded_multi_channel_ =
76 new uint8_t[frame_size_samples_ * 2 * num_channels_];
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000077 }
78
79 ~NetEqStereoTest() {
80 delete neteq_mono_;
81 delete neteq_;
Yves Gerey665174f2018-06-19 15:03:05 +020082 delete[] input_;
83 delete[] encoded_;
84 delete[] input_multi_channel_;
85 delete[] encoded_multi_channel_;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000086 }
87
88 virtual void SetUp() {
89 const std::string file_name =
90 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm");
91 input_file_.reset(new test::InputAudioFile(file_name));
92 NetEqDecoder mono_decoder;
93 NetEqDecoder multi_decoder;
94 switch (sample_rate_hz_) {
95 case 8000:
kwibergee1879c2015-10-29 06:20:28 -070096 mono_decoder = NetEqDecoder::kDecoderPCM16B;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000097 if (num_channels_ == 2) {
kwibergee1879c2015-10-29 06:20:28 -070098 multi_decoder = NetEqDecoder::kDecoderPCM16B_2ch;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000099 } else if (num_channels_ == 5) {
kwibergee1879c2015-10-29 06:20:28 -0700100 multi_decoder = NetEqDecoder::kDecoderPCM16B_5ch;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000101 } else {
102 FAIL() << "Only 2 and 5 channels supported for 8000 Hz.";
103 }
104 break;
105 case 16000:
kwibergee1879c2015-10-29 06:20:28 -0700106 mono_decoder = NetEqDecoder::kDecoderPCM16Bwb;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000107 if (num_channels_ == 2) {
kwibergee1879c2015-10-29 06:20:28 -0700108 multi_decoder = NetEqDecoder::kDecoderPCM16Bwb_2ch;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000109 } else {
110 FAIL() << "More than 2 channels is not supported for 16000 Hz.";
111 }
112 break;
113 case 32000:
kwibergee1879c2015-10-29 06:20:28 -0700114 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb32kHz;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000115 if (num_channels_ == 2) {
kwibergee1879c2015-10-29 06:20:28 -0700116 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb32kHz_2ch;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000117 } else {
118 FAIL() << "More than 2 channels is not supported for 32000 Hz.";
119 }
120 break;
121 case 48000:
kwibergee1879c2015-10-29 06:20:28 -0700122 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000123 if (num_channels_ == 2) {
kwibergee1879c2015-10-29 06:20:28 -0700124 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000125 } else {
126 FAIL() << "More than 2 channels is not supported for 48000 Hz.";
127 }
128 break;
129 default:
130 FAIL() << "We shouldn't get here.";
131 }
henrik.lundin4cf61dd2015-12-09 06:20:58 -0800132 ASSERT_EQ(NetEq::kOK, neteq_mono_->RegisterPayloadType(mono_decoder, "mono",
133 kPayloadTypeMono));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000134 ASSERT_EQ(NetEq::kOK,
henrik.lundin4cf61dd2015-12-09 06:20:58 -0800135 neteq_->RegisterPayloadType(multi_decoder, "multi-channel",
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000136 kPayloadTypeMulti));
137 }
138
139 virtual void TearDown() {}
140
141 int GetNewPackets() {
142 if (!input_file_->Read(frame_size_samples_, input_)) {
143 return -1;
144 }
Yves Gerey665174f2018-06-19 15:03:05 +0200145 payload_size_bytes_ =
146 WebRtcPcm16b_Encode(input_, frame_size_samples_, encoded_);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000147 if (frame_size_samples_ * 2 != payload_size_bytes_) {
148 return -1;
149 }
Yves Gerey665174f2018-06-19 15:03:05 +0200150 int next_send_time = rtp_generator_mono_.GetRtpHeader(
151 kPayloadTypeMono, frame_size_samples_, &rtp_header_mono_);
152 test::InputAudioFile::DuplicateInterleaved(
153 input_, frame_size_samples_, num_channels_, input_multi_channel_);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000154 multi_payload_size_bytes_ = WebRtcPcm16b_Encode(
155 input_multi_channel_, frame_size_samples_ * num_channels_,
156 encoded_multi_channel_);
157 if (frame_size_samples_ * 2 * num_channels_ != multi_payload_size_bytes_) {
158 return -1;
159 }
160 rtp_generator_.GetRtpHeader(kPayloadTypeMulti, frame_size_samples_,
161 &rtp_header_);
162 return next_send_time;
163 }
164
ivoc72c08ed2016-01-20 07:26:24 -0800165 virtual void VerifyOutput(size_t num_samples) {
yujo36b1a5f2017-06-12 12:45:32 -0700166 const int16_t* output_data = output_.data();
167 const int16_t* output_multi_channel_data = output_multi_channel_.data();
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000168 for (size_t i = 0; i < num_samples; ++i) {
Peter Kasting69558702016-01-12 16:26:35 -0800169 for (size_t j = 0; j < num_channels_; ++j) {
yujo36b1a5f2017-06-12 12:45:32 -0700170 ASSERT_EQ(output_data[i],
171 output_multi_channel_data[i * num_channels_ + j])
henrik.lundin6d8e0112016-03-04 10:34:21 -0800172 << "Diff in sample " << i << ", channel " << j << ".";
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000173 }
174 }
175 }
176
177 virtual int GetArrivalTime(int send_time) {
178 int arrival_time = last_arrival_time_ + (send_time - last_send_time_);
179 last_send_time_ = send_time;
180 last_arrival_time_ = arrival_time;
181 return arrival_time;
182 }
183
184 virtual bool Lost() { return false; }
185
186 void RunTest(int num_loops) {
187 // Get next input packets (mono and multi-channel).
188 int next_send_time;
189 int next_arrival_time;
190 do {
191 next_send_time = GetNewPackets();
192 ASSERT_NE(-1, next_send_time);
193 next_arrival_time = GetArrivalTime(next_send_time);
194 } while (Lost()); // If lost, immediately read the next packet.
195
196 int time_now = 0;
197 for (int k = 0; k < num_loops; ++k) {
198 while (time_now >= next_arrival_time) {
199 // Insert packet in mono instance.
200 ASSERT_EQ(NetEq::kOK,
henrik.lundin246ef3e2017-04-24 09:14:32 -0700201 neteq_mono_->InsertPacket(rtp_header_mono_,
kwibergee2bac22015-11-11 10:34:00 -0800202 rtc::ArrayView<const uint8_t>(
203 encoded_, payload_size_bytes_),
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000204 next_arrival_time));
205 // Insert packet in multi-channel instance.
Henrik Lundin70c09bd2017-04-24 15:56:56 +0200206 ASSERT_EQ(NetEq::kOK,
207 neteq_->InsertPacket(
henrik.lundin246ef3e2017-04-24 09:14:32 -0700208 rtp_header_,
Henrik Lundin70c09bd2017-04-24 15:56:56 +0200209 rtc::ArrayView<const uint8_t>(encoded_multi_channel_,
210 multi_payload_size_bytes_),
211 next_arrival_time));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000212 // Get next input packets (mono and multi-channel).
213 do {
214 next_send_time = GetNewPackets();
215 ASSERT_NE(-1, next_send_time);
216 next_arrival_time = GetArrivalTime(next_send_time);
217 } while (Lost()); // If lost, immediately read the next packet.
218 }
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000219 // Get audio from mono instance.
henrik.lundin7a926812016-05-12 13:51:28 -0700220 bool muted;
221 EXPECT_EQ(NetEq::kOK, neteq_mono_->GetAudio(&output_, &muted));
222 ASSERT_FALSE(muted);
henrik.lundin6d8e0112016-03-04 10:34:21 -0800223 EXPECT_EQ(1u, output_.num_channels_);
224 EXPECT_EQ(output_size_samples_, output_.samples_per_channel_);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000225 // Get audio from multi-channel instance.
henrik.lundin7a926812016-05-12 13:51:28 -0700226 ASSERT_EQ(NetEq::kOK, neteq_->GetAudio(&output_multi_channel_, &muted));
227 ASSERT_FALSE(muted);
henrik.lundin6d8e0112016-03-04 10:34:21 -0800228 EXPECT_EQ(num_channels_, output_multi_channel_.num_channels_);
229 EXPECT_EQ(output_size_samples_,
230 output_multi_channel_.samples_per_channel_);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000231 std::ostringstream ss;
232 ss << "Lap number " << k << ".";
233 SCOPED_TRACE(ss.str()); // Print out the parameter values on failure.
234 // Compare mono and multi-channel.
235 ASSERT_NO_FATAL_FAILURE(VerifyOutput(output_size_samples_));
236
237 time_now += kTimeStepMs;
238 }
239 }
240
Peter Kasting69558702016-01-12 16:26:35 -0800241 const size_t num_channels_;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000242 const int sample_rate_hz_;
243 const int samples_per_ms_;
244 const int frame_size_ms_;
Peter Kastingdce40cf2015-08-24 14:52:23 -0700245 const size_t frame_size_samples_;
246 const size_t output_size_samples_;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000247 NetEq* neteq_mono_;
248 NetEq* neteq_;
249 test::RtpGenerator rtp_generator_mono_;
250 test::RtpGenerator rtp_generator_;
251 int16_t* input_;
252 int16_t* input_multi_channel_;
253 uint8_t* encoded_;
254 uint8_t* encoded_multi_channel_;
henrik.lundin6d8e0112016-03-04 10:34:21 -0800255 AudioFrame output_;
256 AudioFrame output_multi_channel_;
henrik.lundin246ef3e2017-04-24 09:14:32 -0700257 RTPHeader rtp_header_mono_;
258 RTPHeader rtp_header_;
Peter Kastingdce40cf2015-08-24 14:52:23 -0700259 size_t payload_size_bytes_;
260 size_t multi_payload_size_bytes_;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000261 int last_send_time_;
262 int last_arrival_time_;
kwiberg2d0c3322016-02-14 09:28:33 -0800263 std::unique_ptr<test::InputAudioFile> input_file_;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000264};
265
266class NetEqStereoTestNoJitter : public NetEqStereoTest {
267 protected:
Yves Gerey665174f2018-06-19 15:03:05 +0200268 NetEqStereoTestNoJitter() : NetEqStereoTest() {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000269 // Start the sender 100 ms before the receiver to pre-fill the buffer.
270 // This is to avoid doing preemptive expand early in the test.
271 // TODO(hlundin): Mock the decision making instead to control the modes.
272 last_arrival_time_ = -100;
273 }
274};
275
ivoc72c08ed2016-01-20 07:26:24 -0800276TEST_P(NetEqStereoTestNoJitter, RunTest) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000277 RunTest(8);
278}
279
280class NetEqStereoTestPositiveDrift : public NetEqStereoTest {
281 protected:
Yves Gerey665174f2018-06-19 15:03:05 +0200282 NetEqStereoTestPositiveDrift() : NetEqStereoTest(), drift_factor(0.9) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000283 // Start the sender 100 ms before the receiver to pre-fill the buffer.
284 // This is to avoid doing preemptive expand early in the test.
285 // TODO(hlundin): Mock the decision making instead to control the modes.
286 last_arrival_time_ = -100;
287 }
288 virtual int GetArrivalTime(int send_time) {
Yves Gerey665174f2018-06-19 15:03:05 +0200289 int arrival_time =
290 last_arrival_time_ + drift_factor * (send_time - last_send_time_);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000291 last_send_time_ = send_time;
292 last_arrival_time_ = arrival_time;
293 return arrival_time;
294 }
295
296 double drift_factor;
297};
298
ivoc72c08ed2016-01-20 07:26:24 -0800299TEST_P(NetEqStereoTestPositiveDrift, RunTest) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000300 RunTest(100);
301}
302
303class NetEqStereoTestNegativeDrift : public NetEqStereoTestPositiveDrift {
304 protected:
Yves Gerey665174f2018-06-19 15:03:05 +0200305 NetEqStereoTestNegativeDrift() : NetEqStereoTestPositiveDrift() {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000306 drift_factor = 1.1;
307 last_arrival_time_ = 0;
308 }
309};
310
ivoc72c08ed2016-01-20 07:26:24 -0800311TEST_P(NetEqStereoTestNegativeDrift, RunTest) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000312 RunTest(100);
313}
314
315class NetEqStereoTestDelays : public NetEqStereoTest {
316 protected:
317 static const int kDelayInterval = 10;
318 static const int kDelay = 1000;
Yves Gerey665174f2018-06-19 15:03:05 +0200319 NetEqStereoTestDelays() : NetEqStereoTest(), frame_index_(0) {}
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000320
321 virtual int GetArrivalTime(int send_time) {
322 // Deliver immediately, unless we have a back-log.
323 int arrival_time = std::min(last_arrival_time_, send_time);
324 if (++frame_index_ % kDelayInterval == 0) {
325 // Delay this packet.
326 arrival_time += kDelay;
327 }
328 last_send_time_ = send_time;
329 last_arrival_time_ = arrival_time;
330 return arrival_time;
331 }
332
333 int frame_index_;
334};
335
ivoc72c08ed2016-01-20 07:26:24 -0800336TEST_P(NetEqStereoTestDelays, RunTest) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000337 RunTest(1000);
338}
339
340class NetEqStereoTestLosses : public NetEqStereoTest {
341 protected:
342 static const int kLossInterval = 10;
Yves Gerey665174f2018-06-19 15:03:05 +0200343 NetEqStereoTestLosses() : NetEqStereoTest(), frame_index_(0) {}
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000344
Yves Gerey665174f2018-06-19 15:03:05 +0200345 virtual bool Lost() { return (++frame_index_) % kLossInterval == 0; }
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000346
ivoc72c08ed2016-01-20 07:26:24 -0800347 // TODO(hlundin): NetEq is not giving bitexact results for these cases.
348 virtual void VerifyOutput(size_t num_samples) {
349 for (size_t i = 0; i < num_samples; ++i) {
yujo36b1a5f2017-06-12 12:45:32 -0700350 const int16_t* output_data = output_.data();
351 const int16_t* output_multi_channel_data = output_multi_channel_.data();
Yves Gerey665174f2018-06-19 15:03:05 +0200352 auto first_channel_sample = output_multi_channel_data[i * num_channels_];
ivoc72c08ed2016-01-20 07:26:24 -0800353 for (size_t j = 0; j < num_channels_; ++j) {
354 const int kErrorMargin = 200;
yujo36b1a5f2017-06-12 12:45:32 -0700355 EXPECT_NEAR(output_data[i],
356 output_multi_channel_data[i * num_channels_ + j],
ivoc72c08ed2016-01-20 07:26:24 -0800357 kErrorMargin)
358 << "Diff in sample " << i << ", channel " << j << ".";
359 EXPECT_EQ(first_channel_sample,
yujo36b1a5f2017-06-12 12:45:32 -0700360 output_multi_channel_data[i * num_channels_ + j]);
ivoc72c08ed2016-01-20 07:26:24 -0800361 }
362 }
363 }
364
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000365 int frame_index_;
366};
367
ivoc72c08ed2016-01-20 07:26:24 -0800368TEST_P(NetEqStereoTestLosses, RunTest) {
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000369 RunTest(100);
370}
371
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000372// Creates a list of parameter sets.
373std::list<TestParameters> GetTestParameters() {
374 std::list<TestParameters> l;
375 const int sample_rates[] = {8000, 16000, 32000};
376 const int num_rates = sizeof(sample_rates) / sizeof(sample_rates[0]);
377 // Loop through sample rates.
378 for (int rate_index = 0; rate_index < num_rates; ++rate_index) {
379 int sample_rate = sample_rates[rate_index];
380 // Loop through all frame sizes between 10 and 60 ms.
381 for (int frame_size = 10; frame_size <= 60; frame_size += 10) {
382 TestParameters p;
383 p.frame_size = frame_size;
384 p.sample_rate = sample_rate;
385 p.num_channels = 2;
386 l.push_back(p);
387 if (sample_rate == 8000) {
388 // Add a five-channel test for 8000 Hz.
389 p.num_channels = 5;
390 l.push_back(p);
391 }
392 }
393 }
394 return l;
395}
396
397// Pretty-printing the test parameters in case of an error.
398void PrintTo(const TestParameters& p, ::std::ostream* os) {
Yves Gerey665174f2018-06-19 15:03:05 +0200399 *os << "{frame_size = " << p.frame_size
400 << ", num_channels = " << p.num_channels
401 << ", sample_rate = " << p.sample_rate << "}";
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +0000402}
403
404// Instantiate the tests. Each test is instantiated using the function above,
405// so that all different parameter combinations are tested.
406INSTANTIATE_TEST_CASE_P(MultiChannel,
407 NetEqStereoTestNoJitter,
408 ::testing::ValuesIn(GetTestParameters()));
409
410INSTANTIATE_TEST_CASE_P(MultiChannel,
411 NetEqStereoTestPositiveDrift,
412 ::testing::ValuesIn(GetTestParameters()));
413
414INSTANTIATE_TEST_CASE_P(MultiChannel,
415 NetEqStereoTestNegativeDrift,
416 ::testing::ValuesIn(GetTestParameters()));
417
418INSTANTIATE_TEST_CASE_P(MultiChannel,
419 NetEqStereoTestDelays,
420 ::testing::ValuesIn(GetTestParameters()));
421
422INSTANTIATE_TEST_CASE_P(MultiChannel,
423 NetEqStereoTestLosses,
424 ::testing::ValuesIn(GetTestParameters()));
425
426} // namespace webrtc