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}
diff --git a/modules/audio_processing/aec3/vector_buffer.h b/modules/audio_processing/aec3/vector_buffer.h
index 9d1539f..36dfa80 100644
--- a/modules/audio_processing/aec3/vector_buffer.h
+++ b/modules/audio_processing/aec3/vector_buffer.h
@@ -21,8 +21,9 @@
// Struct for bundling a circular buffer of one dimensional vector objects
// together with the read and write indices.
+// TODO(peah): Change name of this class to be more specific to what it does.
struct VectorBuffer {
- VectorBuffer(size_t size, size_t height);
+ VectorBuffer(size_t size, size_t num_channels, size_t spectrum_length);
~VectorBuffer();
int IncIndex(int index) const {
@@ -50,7 +51,7 @@
void DecReadIndex() { read = DecIndex(read); }
const int size;
- std::vector<std::vector<float>> buffer;
+ std::vector<std::vector<std::vector<float>>> buffer;
int write = 0;
int read = 0;
};