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

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

Issue 2090583002: New module for the adaptive level controlling functionality in the audio processing module (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Temporarily deactivated the level controller until the CL with the proper tuning has been landed Created 4 years, 5 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) 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 debug_dump_replayer_.RunNextEvent(); 436 debug_dump_replayer_.RunNextEvent();
437 if (event->type() == audioproc::Event::CONFIG) { 437 if (event->type() == audioproc::Event::CONFIG) {
438 const audioproc::Config* msg = &event->config(); 438 const audioproc::Config* msg = &event->config();
439 ASSERT_TRUE(msg->has_experiments_description()); 439 ASSERT_TRUE(msg->has_experiments_description());
440 EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3", 440 EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3",
441 msg->experiments_description().c_str()); 441 msg->experiments_description().c_str());
442 } 442 }
443 } 443 }
444 } 444 }
445 445
446 TEST_F(DebugDumpTest, VerifyLevelControllerExperimentalString) {
447 Config config;
448 config.Set<LevelControl>(new LevelControl(true));
449 DebugDumpGenerator generator(config);
450 generator.StartRecording();
451 generator.Process(100);
452 generator.StopRecording();
453
454 DebugDumpReplayer debug_dump_replayer_;
455
456 ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name()));
457
458 while (const rtc::Optional<audioproc::Event> event =
459 debug_dump_replayer_.GetNextEvent()) {
460 debug_dump_replayer_.RunNextEvent();
461 if (event->type() == audioproc::Event::CONFIG) {
462 const audioproc::Config* msg = &event->config();
463 ASSERT_TRUE(msg->has_experiments_description());
464 EXPECT_PRED_FORMAT2(testing::IsSubstring, "LevelController",
465 msg->experiments_description().c_str());
466 }
467 }
468 }
469
446 TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) { 470 TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) {
447 Config config; 471 Config config;
448 DebugDumpGenerator generator(config); 472 DebugDumpGenerator generator(config);
449 generator.StartRecording(); 473 generator.StartRecording();
450 generator.Process(100); 474 generator.Process(100);
451 generator.StopRecording(); 475 generator.StopRecording();
452 476
453 DebugDumpReplayer debug_dump_replayer_; 477 DebugDumpReplayer debug_dump_replayer_;
454 478
455 ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name())); 479 ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name()));
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 config.Set<ExperimentalNs>(new ExperimentalNs(true)); 545 config.Set<ExperimentalNs>(new ExperimentalNs(true));
522 DebugDumpGenerator generator(config); 546 DebugDumpGenerator generator(config);
523 generator.StartRecording(); 547 generator.StartRecording();
524 generator.Process(100); 548 generator.Process(100);
525 generator.StopRecording(); 549 generator.StopRecording();
526 VerifyDebugDump(generator.dump_file_name()); 550 VerifyDebugDump(generator.dump_file_name());
527 } 551 }
528 552
529 } // namespace test 553 } // namespace test
530 } // namespace webrtc 554 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698