AEC3: Correct high-band gain for multi-channel

The high-band gain is corrected by fixing the computation of the
low-band energy

Bug: webrtc:14108
Change-Id: I5033287de57aedcd91bb71623ca2862519ffb35b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263201
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36972}
diff --git a/modules/audio_processing/aec3/suppression_gain.cc b/modules/audio_processing/aec3/suppression_gain.cc
index d6f592a..0017ca0 100644
--- a/modules/audio_processing/aec3/suppression_gain.cc
+++ b/modules/audio_processing/aec3/suppression_gain.cc
@@ -136,11 +136,9 @@
   const auto sum_of_squares = [](float a, float b) { return a + b * b; };
   float low_band_energy = 0.f;
   for (int ch = 0; ch < num_render_channels; ++ch) {
-    // TODO(bugs.webrtc.org/14108): Fix the computation below to compute the
-    // energy for each channel.
-    const float channel_energy = std::accumulate(
-        render.begin(/*band=0*/ 0, /*channel=*/0),
-        render.end(/*band=0*/ 0, /*channel=*/0), 0.f, sum_of_squares);
+    const float channel_energy =
+        std::accumulate(render.begin(/*band=*/0, ch),
+                        render.end(/*band=*/0, ch), 0.0f, sum_of_squares);
     low_band_energy = std::max(low_band_energy, channel_energy);
   }
   float high_band_energy = 0.f;