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
@ -36,6 +36,16 @@ void SyncBuffer::PushBack(const AudioMultiVector& append_this) {
|
||||
dtmf_index_ -= std::min(dtmf_index_, samples_added);
|
||||
}
|
||||
|
||||
void SyncBuffer::PushBackInterleaved(const rtc::BufferT<int16_t>& append_this) {
|
||||
const size_t size_before_adding = Size();
|
||||
AudioMultiVector::PushBackInterleaved(append_this);
|
||||
const size_t samples_added_per_channel = Size() - size_before_adding;
|
||||
RTC_DCHECK_EQ(samples_added_per_channel * Channels(), append_this.size());
|
||||
AudioMultiVector::PopFront(samples_added_per_channel);
|
||||
next_index_ -= std::min(next_index_, samples_added_per_channel);
|
||||
dtmf_index_ -= std::min(dtmf_index_, samples_added_per_channel);
|
||||
}
|
||||
|
||||
void SyncBuffer::PushFrontZeros(size_t length) {
|
||||
InsertZerosAtIndex(length, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user