OLD | NEW |
---|---|
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
169 int WriteConfigMessage(bool forced); | 169 int WriteConfigMessage(bool forced); |
170 | 170 |
171 rtc::scoped_ptr<FileWrapper> debug_file_; | 171 rtc::scoped_ptr<FileWrapper> debug_file_; |
172 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message. | 172 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message. |
173 std::string event_str_; // Memory for protobuf serialization. | 173 std::string event_str_; // Memory for protobuf serialization. |
174 | 174 |
175 // Serialized string of last saved APM configuration. | 175 // Serialized string of last saved APM configuration. |
176 std::string last_serialized_config_; | 176 std::string last_serialized_config_; |
177 #endif | 177 #endif |
178 | 178 |
179 // Format of processing streams at input/output call sites. | 179 // State that is written to while holding both the render and capture locks |
180 ProcessingConfig api_format_; | 180 // but can be read while holding only one of the locks. |
kwiberg-webrtc
2015/10/26 11:02:46
No lock annotations. Will that show up in a later
peah-webrtc
2015/10/29 14:28:02
Yes, it will.
| |
181 struct SharedState { | |
182 SharedState() | |
183 : // Format of processing streams at input/output call sites. | |
184 api_format_({{{kSampleRate16kHz, 1, false}, | |
185 {kSampleRate16kHz, 1, false}, | |
186 {kSampleRate16kHz, 1, false}, | |
187 {kSampleRate16kHz, 1, false}}}) {} | |
188 ProcessingConfig api_format_; | |
189 } shared_state_; | |
181 | 190 |
182 // Only the rate and samples fields of fwd_proc_format_ are used because the | 191 // Only the rate and samples fields of fwd_proc_format_ are used because the |
183 // forward processing number of channels is mutable and is tracked by the | 192 // forward processing number of channels is mutable and is tracked by the |
184 // capture_audio_. | 193 // capture_audio_. |
185 StreamConfig fwd_proc_format_; | 194 StreamConfig fwd_proc_format_; |
186 StreamConfig rev_proc_format_; | 195 StreamConfig rev_proc_format_; |
187 int split_rate_; | 196 int split_rate_; |
188 | 197 |
189 int stream_delay_ms_; | 198 int stream_delay_ms_; |
190 int delay_offset_ms_; | 199 int delay_offset_ms_; |
(...skipping 18 matching lines...) Expand all Loading... | |
209 rtc::scoped_ptr<Beamformer<float>> beamformer_; | 218 rtc::scoped_ptr<Beamformer<float>> beamformer_; |
210 const std::vector<Point> array_geometry_; | 219 const std::vector<Point> array_geometry_; |
211 | 220 |
212 bool intelligibility_enabled_; | 221 bool intelligibility_enabled_; |
213 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; | 222 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; |
214 }; | 223 }; |
215 | 224 |
216 } // namespace webrtc | 225 } // namespace webrtc |
217 | 226 |
218 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 227 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
OLD | NEW |