ACM: Adding unittests for the remixing functionality

On top of adding unittests for the remixing, the CL
moves the code tested to a separate file in order
to allow it to be tested.

Bug: webrtc:11007
Change-Id: I531736517bbcc715b3c1bf3a4256c42208c5b778
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155740
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29839}
This commit is contained in:
Per Åhgren
2019-11-19 21:00:59 +01:00
committed by Commit Bot
parent 0e3198e434
commit 4dd56a3830
6 changed files with 354 additions and 112 deletions

View File

@ -1638,7 +1638,7 @@ TEST_F(AcmSetBitRateNewApi, OpusFromFormat_48khz_20ms_50kbps) {
// send surround audio.
TEST_F(AudioCodingModuleTestOldApi, SendingMultiChannelForMonoInput) {
constexpr int kSampleRateHz = 48000;
constexpr int kSamplesPerChannel = (kSampleRateHz * 10) / 1000;
constexpr int kSamplesPerChannel = kSampleRateHz * 10 / 1000;
audio_format_ = SdpAudioFormat({"multiopus",
kSampleRateHz,
@ -1692,7 +1692,7 @@ TEST_F(AudioCodingModuleTestOldApi, SendingStereoForMonoInput) {
constexpr int kSampleRateHz = 48000;
constexpr int kSamplesPerChannel = (kSampleRateHz * 10) / 1000;
audio_format_ = SdpAudioFormat("opus", kSampleRateHz, 2);
audio_format_ = SdpAudioFormat("L16", kSampleRateHz, 2);
RegisterCodec();