APM tests: check that the applied input volume is recommended
when volume emulation is used or when neither an input volume controller nor volume emulation are used. This CL adds 3 tests, 2 of which currently fail because APM behaves in an undesired way. In [1] the behavior is fixed and the tests are enabled. A DCHECK in `AudioProcessingImpl::set_stream_analog_level` has been removed since a more robust behavior can be obtained - namely, that expected in the disabled unit tests added in this CL. [1] https://webrtc-review.googlesource.com/c/src/+/281185 Bug: webrtc:14581 Change-Id: I29d2c000cd1baf90606487afd9a4042e6f487834 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281184 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38696}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
987ebe6b49
commit
79beaa7f38
@ -1746,12 +1746,6 @@ void AudioProcessingImpl::set_stream_key_pressed(bool key_pressed) {
|
||||
}
|
||||
|
||||
void AudioProcessingImpl::set_stream_analog_level(int level) {
|
||||
// Check that input volume emulation is disabled since, when enabled, there is
|
||||
// no externally applied input volume to notify to APM.
|
||||
RTC_DCHECK(
|
||||
!submodules_.capture_levels_adjuster ||
|
||||
!config_.capture_level_adjustment.analog_mic_gain_emulation.enabled);
|
||||
|
||||
MutexLock lock_capture(&mutex_capture_);
|
||||
set_stream_analog_level_locked(level);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user