Tests for multi-stream Opus.
This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
tests are in audio_coding_unittest.cc. Some refactoring of
AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
possible. A few checks for "channels \in {1, 2}" are replaced with
"channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
other changes are made to be able to write and read multi-channel WAV
files.
The SDP changes are NOT included; as of this CL there is no way to set
up a multi-stream opus en/de-coder from SDP strings.
Bug: webrtc:8649
Change-Id: I1d93a9b8eecc3f6e19896ff2e2ce9b63da77a23c
Reviewed-on: https://webrtc-review.googlesource.com/c/114883
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26742}
This commit is contained in:
@ -71,7 +71,8 @@ class OpusFrame : public AudioDecoder::EncodedAudioFrame {
|
||||
|
||||
AudioDecoderOpusImpl::AudioDecoderOpusImpl(size_t num_channels)
|
||||
: channels_(num_channels) {
|
||||
RTC_DCHECK(num_channels == 1 || num_channels == 2);
|
||||
RTC_DCHECK(num_channels == 1 || num_channels == 2 || num_channels == 4 ||
|
||||
num_channels == 6 || num_channels == 8);
|
||||
const int error = WebRtcOpus_DecoderCreate(&dec_state_, channels_);
|
||||
RTC_DCHECK(error == 0);
|
||||
WebRtcOpus_DecoderInit(dec_state_);
|
||||
|
||||
Reference in New Issue
Block a user