Add ability to state whether the APM output will be used
This CL adds the ability for the surrounding code to state that the APM output will not be used. The intended usecase for this is to allow APM to run at a lower complexity when the endpoint is muted. When APM has been informed that the output will not be used, it can turn off code that is needed only for ensuring that the output audio will sound good. Bug: b/154437967,b/163802450 Change-Id: I8e22989e35354372e96191d15da44beb9d1b26ae Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181200 Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31949}
This commit is contained in:
@ -705,6 +705,7 @@ void AudioProcessingImpl::SetRuntimeSetting(RuntimeSetting setting) {
|
||||
case RuntimeSetting::Type::kCapturePreGain:
|
||||
case RuntimeSetting::Type::kCaptureCompressionGain:
|
||||
case RuntimeSetting::Type::kCaptureFixedPostGain:
|
||||
case RuntimeSetting::Type::kCaptureOutputUsed:
|
||||
capture_runtime_settings_enqueuer_.Enqueue(setting);
|
||||
return;
|
||||
case RuntimeSetting::Type::kPlayoutVolumeChange:
|
||||
@ -865,6 +866,10 @@ void AudioProcessingImpl::HandleCaptureRuntimeSettings() {
|
||||
case RuntimeSetting::Type::kNotSpecified:
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
case RuntimeSetting::Type::kCaptureOutputUsed:
|
||||
// TODO(b/154437967): Add support for reducing complexity when it is
|
||||
// known that the capture output will not be used.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -886,6 +891,7 @@ void AudioProcessingImpl::HandleRenderRuntimeSettings() {
|
||||
case RuntimeSetting::Type::kCapturePreGain: // fall-through
|
||||
case RuntimeSetting::Type::kCaptureCompressionGain: // fall-through
|
||||
case RuntimeSetting::Type::kCaptureFixedPostGain: // fall-through
|
||||
case RuntimeSetting::Type::kCaptureOutputUsed: // fall-through
|
||||
case RuntimeSetting::Type::kNotSpecified:
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user