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

Unified Diff: webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc

Issue 2846853002: audioproc_f with fake microphone. (Closed)
Patch Set: Initialized FakeRecordingDevice, added 'kind' command line flag, fixed bugs. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_processing/test/fake_recording_device.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc
diff --git a/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc b/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e41a1504f450cd8493f79e52069db1a7f6506af2
--- /dev/null
+++ b/webrtc/modules/audio_processing/test/fake_recording_device_unittest.cc
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "webrtc/modules/audio_processing/test/fake_recording_device.h"
+#include "webrtc/test/gtest.h"
+
+TEST(AnalogVolumeMapper, GainCurveShouldBeMonotone) {
+ // using MappingKind = webrtc::FakeRecordingDevice::LevelToScalingMappingKind;
+
+ // for (auto kind : {MappingKind::kLinear}) {
+ // webrtc::FakeRecordingDevice level_mapper(kind);
+ // float last_level = level_mapper.GetScalingFactor();
+ // RTC_DCHECK_LE(0.f, last_level);
+
+ // for (int i = 0; i < 255; ++i) {
+ // level_mapper.set_analog_level(i);
+ // const float current_level = level_mapper.GetScalingFactor();
+ // RTC_DCHECK_LE(last_level, current_level);
+
+ // last_level = current_level;
+ // }
+ // }
+}
« no previous file with comments | « webrtc/modules/audio_processing/test/fake_recording_device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698