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

Side by Side Diff: webrtc/modules/audio_processing/test/debug_dump_test.cc

Issue 1864453002: Fixing an error in DebugDumpTest. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // guaranteed if the debug dump is started on the first frame. 234 // guaranteed if the debug dump is started on the first frame.
235 void VerifyDebugDump(const std::string& dump_file_name); 235 void VerifyDebugDump(const std::string& dump_file_name);
236 236
237 private: 237 private:
238 DebugDumpReplayer debug_dump_replayer_; 238 DebugDumpReplayer debug_dump_replayer_;
239 }; 239 };
240 240
241 void DebugDumpTest::VerifyDebugDump(const std::string& in_filename) { 241 void DebugDumpTest::VerifyDebugDump(const std::string& in_filename) {
242 ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(in_filename)); 242 ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(in_filename));
243 243
244 if (const rtc::Optional<audioproc::Event> event = 244 while (const rtc::Optional<audioproc::Event> event =
245 debug_dump_replayer_.GetNextEvent()) { 245 debug_dump_replayer_.GetNextEvent()) {
246 debug_dump_replayer_.RunNextEvent(); 246 debug_dump_replayer_.RunNextEvent();
247 if (event->type() == audioproc::Event::STREAM) { 247 if (event->type() == audioproc::Event::STREAM) {
248 const audioproc::Stream* msg = &event->stream(); 248 const audioproc::Stream* msg = &event->stream();
249 const StreamConfig output_config = debug_dump_replayer_.GetOutputConfig(); 249 const StreamConfig output_config = debug_dump_replayer_.GetOutputConfig();
250 const ChannelBuffer<float>* output = debug_dump_replayer_.GetOutput(); 250 const ChannelBuffer<float>* output = debug_dump_replayer_.GetOutput();
251 // Check that output of APM is bit-exact to the output in the dump. 251 // Check that output of APM is bit-exact to the output in the dump.
252 ASSERT_EQ(output_config.num_channels(), 252 ASSERT_EQ(output_config.num_channels(),
253 static_cast<size_t>(msg->output_channel_size())); 253 static_cast<size_t>(msg->output_channel_size()));
254 ASSERT_EQ(output_config.num_frames() * sizeof(float), 254 ASSERT_EQ(output_config.num_frames() * sizeof(float),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 config.Set<ExperimentalNs>(new ExperimentalNs(true)); 397 config.Set<ExperimentalNs>(new ExperimentalNs(true));
398 DebugDumpGenerator generator(config); 398 DebugDumpGenerator generator(config);
399 generator.StartRecording(); 399 generator.StartRecording();
400 generator.Process(100); 400 generator.Process(100);
401 generator.StopRecording(); 401 generator.StopRecording();
402 VerifyDebugDump(generator.dump_file_name()); 402 VerifyDebugDump(generator.dump_file_name());
403 } 403 }
404 404
405 } // namespace test 405 } // namespace test
406 } // namespace webrtc 406 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698