modules/audio_processing/echo_cancellation_impl.cc
// Read chunks of data that were received and queued on the render side from
// a queue. All the data chunks are buffered into the farend signal of the AEC.
Read chunks of data that were received and queued on the render side from
a queue. All the data chunks are buffered into the farend signal of the AEC.
Read chunks of data that were received and queued on the render side from a queue . All the data chunks are buffered into the farend signal of the AEC .
void EchoCancellationImpl::ReadQueuedRenderData() {
  if (!is_component_enabled()) {
    return;
  }
  while (render_signal_queue_->Remove(&capture_queue_buffer_)) {
    size_t handle_index = 0;
    int buffer_index = 0;
    const int num_frames_per_band =
        capture_queue_buffer_.size() /
        (apm_->num_output_channels() * apm_->num_reverse_channels());
    for (int i = 0; i < apm_->num_output_channels(); i++) {
      for (int j = 0; j < apm_->num_reverse_channels(); j++) {
        Handle* my_handle = static_cast<Handle*>(handle(handle_index));
        WebRtcAec_BufferFarend(my_handle, &capture_queue_buffer_[buffer_index],
                               num_frames_per_band);
        buffer_index += num_frames_per_band;
        handle_index++;
      }
    }
  }
}
void EchoCancellationImpl :: ReadQueuedRenderData ( ) { if ( ! is_component_enabled ( ) ) { return ; } while ( render_signal_queue_ -> Remove ( & capture_queue_buffer_ ) ) { size_t handle_index = 0 ; int buffer_index = 0 ; const int num_frames_per_band = capture_queue_buffer_ . size ( ) / ( apm_ -> num_output_channels ( ) * apm_ -> num_reverse_channels ( ) ) ; for ( int i = 0 ; i < apm_ -> num_output_channels ( ) ; i ++ ) { for ( int j = 0 ; j < apm_ -> num_reverse_channels ( ) ; j ++ ) { Handle * my_handle = static_cast < Handle * > ( handle ( handle_index ) ) ; WebRtcAec_BufferFarend ( my_handle , & capture_queue_buffer_ [ buffer_index ] , num_frames_per_band ) ; buffer_index += num_frames_per_band ; handle_index ++ ; } } } }
Read chunks of data that were received and queued on the render side from
a queue.
Read chunks of data that were received and queued on the render side from a queue .