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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.h

Issue 1413093002: Lock scheme #6: Preparational work before introducing the locks in order to harmonize the code (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@introduce_queue_agc_CL
Patch Set: Merged with latest master Created 5 years, 1 month 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 | « no previous file | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_impl.h
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index 542886ee10ee5e85567210ef72a3fd6f27306254..72dfbf419b27ee264d870c22ef5a71330ae4d7e0 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -176,8 +176,17 @@ class AudioProcessingImpl : public AudioProcessing {
std::string last_serialized_config_;
#endif
- // Format of processing streams at input/output call sites.
- ProcessingConfig api_format_;
+ // State that is written to while holding both the render and capture locks
+ // but can be read while holding only one of the locks.
+ struct SharedState {
+ SharedState()
+ : // Format of processing streams at input/output call sites.
+ api_format_({{{kSampleRate16kHz, 1, false},
+ {kSampleRate16kHz, 1, false},
+ {kSampleRate16kHz, 1, false},
+ {kSampleRate16kHz, 1, false}}}) {}
+ ProcessingConfig api_format_;
+ } shared_state_;
// Only the rate and samples fields of fwd_proc_format_ are used because the
// forward processing number of channels is mutable and is tracked by the
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/audio_processing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698