WebRTC Opus C interface: Add support for non-48 kHz encode sample rate
Plus tests fo 16 kHz. Bug: webrtc:10631 Change-Id: I162c40b6120d7e308e535faba7501e437b0b5dc4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137047 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28029}
This commit is contained in:
@ -760,7 +760,8 @@ bool AudioEncoderOpusImpl::RecreateEncoderInstance(
|
||||
config.application ==
|
||||
AudioEncoderOpusConfig::ApplicationMode::kVoip
|
||||
? 0
|
||||
: 1));
|
||||
: 1,
|
||||
48000));
|
||||
const int bitrate = GetBitrateBps(config);
|
||||
RTC_CHECK_EQ(0, WebRtcOpus_SetBitRate(inst_, bitrate));
|
||||
RTC_LOG(LS_INFO) << "Set Opus bitrate to " << bitrate << " bps.";
|
||||
|
||||
Reference in New Issue
Block a user