Added a query function for whether submodules are enabled
that can be called from the render side without making APM singlethreaded. This CL is addressing the problems with high render-side call duration that were triggered by the CL https://codereview.webrtc.org/1844583003 BUG=webrtc:5736 Review URL: https://codereview.webrtc.org/1859243002 Cr-Commit-Position: refs/heads/master@{#12266}
This commit is contained in:
@ -310,6 +310,12 @@ int GainControlImpl::Enable(bool enable) {
|
||||
return AudioProcessing::kNoError;
|
||||
}
|
||||
|
||||
bool GainControlImpl::is_enabled_render_side_query() const {
|
||||
// TODO(peah): Add threadchecker.
|
||||
rtc::CritScope cs(crit_render_);
|
||||
return enabled_;
|
||||
}
|
||||
|
||||
bool GainControlImpl::is_enabled() const {
|
||||
rtc::CritScope cs(crit_capture_);
|
||||
return enabled_;
|
||||
|
||||
Reference in New Issue
Block a user