Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: webrtc/modules/audio_coding/test/delay_test.cc

Issue 1985743002: Propagate muted parameter to VoE::Channel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resurrect the PlayoutData10Ms(int, AudioFrame*) method Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 "curr buff-lev = %4u opt buff-lev = %4u \n", 197 "curr buff-lev = %4u opt buff-lev = %4u \n",
198 statistics.minWaitingTimeMs, statistics.maxWaitingTimeMs, 198 statistics.minWaitingTimeMs, statistics.maxWaitingTimeMs,
199 statistics.meanWaitingTimeMs, statistics.medianWaitingTimeMs, 199 statistics.meanWaitingTimeMs, statistics.medianWaitingTimeMs,
200 average_delay, statistics.currentBufferSize, 200 average_delay, statistics.currentBufferSize,
201 statistics.preferredBufferSize); 201 statistics.preferredBufferSize);
202 fflush (stdout); 202 fflush (stdout);
203 } 203 }
204 204
205 in_file_a_.Read10MsData(audio_frame); 205 in_file_a_.Read10MsData(audio_frame);
206 ASSERT_GE(acm_a_->Add10MsData(audio_frame), 0); 206 ASSERT_GE(acm_a_->Add10MsData(audio_frame), 0);
207 ASSERT_EQ(0, acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame)); 207 bool muted;
208 ASSERT_EQ(0,
209 acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted));
210 RTC_DCHECK(!muted);
208 out_file_b_.Write10MsData( 211 out_file_b_.Write10MsData(
209 audio_frame.data_, 212 audio_frame.data_,
210 audio_frame.samples_per_channel_ * audio_frame.num_channels_); 213 audio_frame.samples_per_channel_ * audio_frame.num_channels_);
211 received_ts = channel_a2b_->LastInTimestamp(); 214 received_ts = channel_a2b_->LastInTimestamp();
212 rtc::Optional<uint32_t> playout_timestamp = acm_b_->PlayoutTimestamp(); 215 rtc::Optional<uint32_t> playout_timestamp = acm_b_->PlayoutTimestamp();
213 ASSERT_TRUE(playout_timestamp); 216 ASSERT_TRUE(playout_timestamp);
214 inst_delay_sec = static_cast<uint32_t>(received_ts - *playout_timestamp) / 217 inst_delay_sec = static_cast<uint32_t>(received_ts - *playout_timestamp) /
215 static_cast<double>(encoding_sample_rate_hz_); 218 static_cast<double>(encoding_sample_rate_hz_);
216 219
217 if (num_frames > 10) 220 if (num_frames > 10)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 test_setting.codec.num_channels = FLAGS_num_channels; 259 test_setting.codec.num_channels = FLAGS_num_channels;
257 test_setting.acm.dtx = FLAGS_dtx; 260 test_setting.acm.dtx = FLAGS_dtx;
258 test_setting.acm.fec = FLAGS_fec; 261 test_setting.acm.fec = FLAGS_fec;
259 test_setting.packet_loss = FLAGS_packet_loss; 262 test_setting.packet_loss = FLAGS_packet_loss;
260 263
261 webrtc::DelayTest delay_test; 264 webrtc::DelayTest delay_test;
262 delay_test.Initialize(); 265 delay_test.Initialize();
263 delay_test.Perform(&test_setting, 1, 240, "delay_test"); 266 delay_test.Perform(&test_setting, 1, 240, "delay_test");
264 return 0; 267 return 0;
265 } 268 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/test/TwoWayCommunication.cc ('k') | webrtc/modules/audio_coding/test/iSACTest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698