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

Unified Diff: webrtc/modules/audio_processing/test/identity_analog_volume_mapper.h

Issue 2837553002: First try on a fake analog volume control interface for use in audioproc_f. (Closed)
Patch Set: 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
Index: webrtc/modules/audio_processing/test/identity_analog_volume_mapper.h
diff --git a/webrtc/modules/audio_processing/test/identity_analog_volume_mapper.h b/webrtc/modules/audio_processing/test/identity_analog_volume_mapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..784b0f26d68ce6a21f8452af2740a91009b7f526
--- /dev/null
+++ b/webrtc/modules/audio_processing/test/identity_analog_volume_mapper.h
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_IDENTITY_ANALOG_VOLUME_MAPPER_H_
+#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_IDENTITY_ANALOG_VOLUME_MAPPER_H_
+
+#include "webrtc/base/checks.h"
+#include "webrtc/modules/audio_processing/test/analog_volume_mapper.h"
+
+namespace webrtc {
+
+// An analog level mapper in which the level doesn't influence the
+// signal.
+class IdentityAnalogLevelMapper : public AnalogLevelMapper {
AleBzk 2017/04/21 10:35:49 Great to have this! We might want to use it in aud
peah-webrtc 2017/04/21 12:04:39 I don't see the purpose of this class. I don't thi
aleloi 2017/04/24 11:34:45 I wanted to always use an AnalogLevelMapper instan
+ public:
+ ~IdentityAnalogLevelMapper() = default;
+ float get_scaling_factor() const override { return 1.0f; }
+};
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_IDENTITY_ANALOG_VOLUME_MAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698