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; |
+ // } |
+ // } |
+} |