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 <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29135}
This commit is contained in:
henrika
2019-09-10 14:27:40 +02:00
committed by Commit Bot
parent 45b01c7962
commit 3354157d36

View File

@ -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;