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:
Karl Wiberg
2019-05-21 11:50:32 +02:00
committed by Commit Bot
parent 646fda0212
commit 7e7c5c3c25
9 changed files with 182 additions and 154 deletions

View File

@ -35,6 +35,7 @@ typedef struct WebRtcOpusDecInst OpusDecInst;
* Favor speech intelligibility.
* 1 - Audio applications.
* Favor faithfulness to the original input.
* - sample_rate_hz : sample rate of input audio
*
* Output:
* - inst : a pointer to Encoder context that is created
@ -45,7 +46,8 @@ typedef struct WebRtcOpusDecInst OpusDecInst;
*/
int16_t WebRtcOpus_EncoderCreate(OpusEncInst** inst,
size_t channels,
int32_t application);
int32_t application,
int sample_rate_hz);
/****************************************************************************
* WebRtcOpus_MultistreamEncoderCreate(...)