Make VectorBuffer in AEC3 multi-channel

All dependent modules are hardcoded to do their regular mono processing on the first channel.

This _almost_ makes RenderBuffer multi-channel: FftData is still only mono.

Bug: webrtc:10913
Change-Id: Id5cc34dbabfe59e1cc72a9675dc7979794e870ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151139
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29074}
This commit is contained in:
Sam Zackrisson
2019-09-05 09:35:10 +02:00
committed by Commit Bot
parent 9305d11f17
commit a81c09d5b6
17 changed files with 69 additions and 41 deletions

View File

@ -44,10 +44,11 @@ class RenderBuffer {
}
// Get the spectrum from one of the FFTs in the buffer.
rtc::ArrayView<const float> Spectrum(int buffer_offset_ffts) const {
rtc::ArrayView<const float> Spectrum(int buffer_offset_ffts,
size_t channel) const {
int position = spectrum_buffer_->OffsetIndex(spectrum_buffer_->read,
buffer_offset_ffts);
return spectrum_buffer_->buffer[position];
return spectrum_buffer_->buffer[position][channel];
}
// Returns the circular fft buffer.