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

Side by Side Diff: webrtc/modules/audio_processing/include/audio_processing.h

Issue 1586563003: Revert of Use an explicit identifier in Config (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 | « webrtc/config.h ('k') | webrtc/modules/video_coding/codecs/vp8/temporal_layers.h » ('j') | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // sufficiently unreliable. See WEBRTC_UNTRUSTED_DELAY in echo_cancellation.c. 58 // sufficiently unreliable. See WEBRTC_UNTRUSTED_DELAY in echo_cancellation.c.
59 // - Faster startup times by removing the excessive "startup phase" processing 59 // - Faster startup times by removing the excessive "startup phase" processing
60 // of reported delays. 60 // of reported delays.
61 // - Much more conservative adjustments to the far-end read pointer. We smooth 61 // - Much more conservative adjustments to the far-end read pointer. We smooth
62 // the delay difference more heavily, and back off from the difference more. 62 // the delay difference more heavily, and back off from the difference more.
63 // Adjustments force a readaptation of the filter, so they should be avoided 63 // Adjustments force a readaptation of the filter, so they should be avoided
64 // except when really necessary. 64 // except when really necessary.
65 struct ExtendedFilter { 65 struct ExtendedFilter {
66 ExtendedFilter() : enabled(false) {} 66 ExtendedFilter() : enabled(false) {}
67 explicit ExtendedFilter(bool enabled) : enabled(enabled) {} 67 explicit ExtendedFilter(bool enabled) : enabled(enabled) {}
68 static const ConfigOptionID identifier = ConfigOptionID::kExtendedFilter;
69 bool enabled; 68 bool enabled;
70 }; 69 };
71 70
72 // Enables delay-agnostic echo cancellation. This feature relies on internally 71 // Enables delay-agnostic echo cancellation. This feature relies on internally
73 // estimated delays between the process and reverse streams, thus not relying 72 // estimated delays between the process and reverse streams, thus not relying
74 // on reported system delays. This configuration only applies to 73 // on reported system delays. This configuration only applies to
75 // EchoCancellation and not EchoControlMobile. It can be set in the constructor 74 // EchoCancellation and not EchoControlMobile. It can be set in the constructor
76 // or using AudioProcessing::SetExtraOptions(). 75 // or using AudioProcessing::SetExtraOptions().
77 struct DelayAgnostic { 76 struct DelayAgnostic {
78 DelayAgnostic() : enabled(false) {} 77 DelayAgnostic() : enabled(false) {}
79 explicit DelayAgnostic(bool enabled) : enabled(enabled) {} 78 explicit DelayAgnostic(bool enabled) : enabled(enabled) {}
80 static const ConfigOptionID identifier = ConfigOptionID::kDelayAgnostic;
81 bool enabled; 79 bool enabled;
82 }; 80 };
83 81
84 // Use to enable experimental gain control (AGC). At startup the experimental 82 // Use to enable experimental gain control (AGC). At startup the experimental
85 // AGC moves the microphone volume up to |startup_min_volume| if the current 83 // AGC moves the microphone volume up to |startup_min_volume| if the current
86 // microphone volume is set too low. The value is clamped to its operating range 84 // microphone volume is set too low. The value is clamped to its operating range
87 // [12, 255]. Here, 255 maps to 100%. 85 // [12, 255]. Here, 255 maps to 100%.
88 // 86 //
89 // Must be provided through AudioProcessing::Create(Confg&). 87 // Must be provided through AudioProcessing::Create(Confg&).
90 #if defined(WEBRTC_CHROMIUM_BUILD) 88 #if defined(WEBRTC_CHROMIUM_BUILD)
91 static const int kAgcStartupMinVolume = 85; 89 static const int kAgcStartupMinVolume = 85;
92 #else 90 #else
93 static const int kAgcStartupMinVolume = 0; 91 static const int kAgcStartupMinVolume = 0;
94 #endif // defined(WEBRTC_CHROMIUM_BUILD) 92 #endif // defined(WEBRTC_CHROMIUM_BUILD)
95 struct ExperimentalAgc { 93 struct ExperimentalAgc {
96 ExperimentalAgc() : enabled(true), startup_min_volume(kAgcStartupMinVolume) {} 94 ExperimentalAgc() : enabled(true), startup_min_volume(kAgcStartupMinVolume) {}
97 explicit ExperimentalAgc(bool enabled) 95 explicit ExperimentalAgc(bool enabled)
98 : enabled(enabled), startup_min_volume(kAgcStartupMinVolume) {} 96 : enabled(enabled), startup_min_volume(kAgcStartupMinVolume) {}
99 ExperimentalAgc(bool enabled, int startup_min_volume) 97 ExperimentalAgc(bool enabled, int startup_min_volume)
100 : enabled(enabled), startup_min_volume(startup_min_volume) {} 98 : enabled(enabled), startup_min_volume(startup_min_volume) {}
101 static const ConfigOptionID identifier = ConfigOptionID::kExperimentalAgc;
102 bool enabled; 99 bool enabled;
103 int startup_min_volume; 100 int startup_min_volume;
104 }; 101 };
105 102
106 // Use to enable experimental noise suppression. It can be set in the 103 // Use to enable experimental noise suppression. It can be set in the
107 // constructor or using AudioProcessing::SetExtraOptions(). 104 // constructor or using AudioProcessing::SetExtraOptions().
108 struct ExperimentalNs { 105 struct ExperimentalNs {
109 ExperimentalNs() : enabled(false) {} 106 ExperimentalNs() : enabled(false) {}
110 explicit ExperimentalNs(bool enabled) : enabled(enabled) {} 107 explicit ExperimentalNs(bool enabled) : enabled(enabled) {}
111 static const ConfigOptionID identifier = ConfigOptionID::kExperimentalNs;
112 bool enabled; 108 bool enabled;
113 }; 109 };
114 110
115 // Use to enable beamforming. Must be provided through the constructor. It will 111 // Use to enable beamforming. Must be provided through the constructor. It will
116 // have no impact if used with AudioProcessing::SetExtraOptions(). 112 // have no impact if used with AudioProcessing::SetExtraOptions().
117 struct Beamforming { 113 struct Beamforming {
118 Beamforming() 114 Beamforming()
119 : enabled(false), 115 : enabled(false),
120 array_geometry(), 116 array_geometry(),
121 target_direction( 117 target_direction(
122 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) {} 118 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) {}
123 Beamforming(bool enabled, const std::vector<Point>& array_geometry) 119 Beamforming(bool enabled, const std::vector<Point>& array_geometry)
124 : Beamforming(enabled, 120 : Beamforming(enabled,
125 array_geometry, 121 array_geometry,
126 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) { 122 SphericalPointf(static_cast<float>(M_PI) / 2.f, 0.f, 1.f)) {
127 } 123 }
128 Beamforming(bool enabled, 124 Beamforming(bool enabled,
129 const std::vector<Point>& array_geometry, 125 const std::vector<Point>& array_geometry,
130 SphericalPointf target_direction) 126 SphericalPointf target_direction)
131 : enabled(enabled), 127 : enabled(enabled),
132 array_geometry(array_geometry), 128 array_geometry(array_geometry),
133 target_direction(target_direction) {} 129 target_direction(target_direction) {}
134 static const ConfigOptionID identifier = ConfigOptionID::kBeamforming;
135 const bool enabled; 130 const bool enabled;
136 const std::vector<Point> array_geometry; 131 const std::vector<Point> array_geometry;
137 const SphericalPointf target_direction; 132 const SphericalPointf target_direction;
138 }; 133 };
139 134
140 // Use to enable intelligibility enhancer in audio processing. Must be provided 135 // Use to enable intelligibility enhancer in audio processing. Must be provided
141 // though the constructor. It will have no impact if used with 136 // though the constructor. It will have no impact if used with
142 // AudioProcessing::SetExtraOptions(). 137 // AudioProcessing::SetExtraOptions().
143 // 138 //
144 // Note: If enabled and the reverse stream has more than one output channel, 139 // Note: If enabled and the reverse stream has more than one output channel,
145 // the reverse stream will become an upmixed mono signal. 140 // the reverse stream will become an upmixed mono signal.
146 struct Intelligibility { 141 struct Intelligibility {
147 Intelligibility() : enabled(false) {} 142 Intelligibility() : enabled(false) {}
148 explicit Intelligibility(bool enabled) : enabled(enabled) {} 143 explicit Intelligibility(bool enabled) : enabled(enabled) {}
149 static const ConfigOptionID identifier = ConfigOptionID::kIntelligibility;
150 bool enabled; 144 bool enabled;
151 }; 145 };
152 146
153 // The Audio Processing Module (APM) provides a collection of voice processing 147 // The Audio Processing Module (APM) provides a collection of voice processing
154 // components designed for real-time communications software. 148 // components designed for real-time communications software.
155 // 149 //
156 // APM operates on two audio streams on a frame-by-frame basis. Frames of the 150 // APM operates on two audio streams on a frame-by-frame basis. Frames of the
157 // primary stream, on which all processing is applied, are passed to 151 // primary stream, on which all processing is applied, are passed to
158 // |ProcessStream()|. Frames of the reverse direction stream, which are used for 152 // |ProcessStream()|. Frames of the reverse direction stream, which are used for
159 // analysis by some components, are passed to |AnalyzeReverseStream()|. On the 153 // analysis by some components, are passed to |AnalyzeReverseStream()|. On the
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 // This does not impact the size of frames passed to |ProcessStream()|. 948 // This does not impact the size of frames passed to |ProcessStream()|.
955 virtual int set_frame_size_ms(int size) = 0; 949 virtual int set_frame_size_ms(int size) = 0;
956 virtual int frame_size_ms() const = 0; 950 virtual int frame_size_ms() const = 0;
957 951
958 protected: 952 protected:
959 virtual ~VoiceDetection() {} 953 virtual ~VoiceDetection() {}
960 }; 954 };
961 } // namespace webrtc 955 } // namespace webrtc
962 956
963 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_ 957 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
OLDNEW
« no previous file with comments | « webrtc/config.h ('k') | webrtc/modules/video_coding/codecs/vp8/temporal_layers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698