From 3354157d367a4cfba9b51f59e516182071ac465e Mon Sep 17 00:00:00 2001 From: henrika Date: Tue, 10 Sep 2019 14:27:40 +0200 Subject: [PATCH] Add support for 192kHz input audio sample rate. The existing restriction of max 48k seems old and outdated. I am unable to see any issues by simply extending the support to 96 and utilize the existing resampler in WebRTC. There are no memory limitations involved either. It is a rather common case today in Chrome that users need 96k/192k input; hence this simple change will have a positive impact for many WebRTC clients using gUM. Bug: webrtc:10958 Test: https://webrtc.github.io/samples/src/content/peerconnection/audio/ using mic @96k Change-Id: I8123da886ef7d48cbec9482795ec837ec1f61d81 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152162 Commit-Queue: Henrik Andreassson Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#29135} --- modules/audio_coding/acm2/audio_coding_module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc index a6f6718155..3f7a06a5fb 100644 --- a/modules/audio_coding/acm2/audio_coding_module.cc +++ b/modules/audio_coding/acm2/audio_coding_module.cc @@ -381,7 +381,7 @@ int AudioCodingModuleImpl::Add10MsDataInternal(const AudioFrame& audio_frame, return -1; } - if (audio_frame.sample_rate_hz_ > 48000) { + if (audio_frame.sample_rate_hz_ > 192000) { assert(false); RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, input frequency not valid"; return -1;