Let NetEq use the PLC output from a decoder
This change enables NetEq to use the packet concealment audio (aka PLC) produced by a decoder. The change also includes a new API to the AudioDecoder interface, which lets the decoder implementation generate and deliver concealment audio. Bug: webrtc:9180 Change-Id: Icaacebccf645d4694b0d2d6310f6f2c7132881c4 Reviewed-on: https://webrtc-review.googlesource.com/96340 Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24738}
This commit is contained in:
committed by
Commit Bot
parent
e899629be4
commit
00eb12a20c
@ -67,15 +67,15 @@ void AudioMultiVector::CopyTo(AudioMultiVector* copy_to) const {
|
||||
}
|
||||
}
|
||||
|
||||
void AudioMultiVector::PushBackInterleaved(const int16_t* append_this,
|
||||
size_t length) {
|
||||
assert(length % num_channels_ == 0);
|
||||
void AudioMultiVector::PushBackInterleaved(
|
||||
rtc::ArrayView<const int16_t> append_this) {
|
||||
RTC_DCHECK_EQ(append_this.size() % num_channels_, 0);
|
||||
if (num_channels_ == 1) {
|
||||
// Special case to avoid extra allocation and data shuffling.
|
||||
channels_[0]->PushBack(append_this, length);
|
||||
channels_[0]->PushBack(append_this.data(), append_this.size());
|
||||
return;
|
||||
}
|
||||
size_t length_per_channel = length / num_channels_;
|
||||
size_t length_per_channel = append_this.size() / num_channels_;
|
||||
int16_t* temp_array = new int16_t[length_per_channel]; // Temporary storage.
|
||||
for (size_t channel = 0; channel < num_channels_; ++channel) {
|
||||
// Copy elements to |temp_array|.
|
||||
|
||||
Reference in New Issue
Block a user