| Index: content/renderer/media/media_stream_audio_processor.cc
|
| diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
|
| index e15e13b143c5b6e4faf5f09f43b8fcfe2fe63d38..243a736bc9be853b43d5820cd9c3472c9156bfaa 100644
|
| --- a/content/renderer/media/media_stream_audio_processor.cc
|
| +++ b/content/renderer/media/media_stream_audio_processor.cc
|
| @@ -245,6 +245,7 @@ MediaStreamAudioProcessor::MediaStreamAudioProcessor(
|
| const MediaStreamDevice::AudioDeviceParameters& input_params,
|
| WebRtcPlayoutDataSource* playout_data_source)
|
| : render_delay_ms_(0),
|
| + audio_repetition_detector_(new AudioRepetitionDetector()),
|
| playout_data_source_(playout_data_source),
|
| audio_mirroring_(false),
|
| typing_detected_(false),
|
| @@ -304,6 +305,15 @@ bool MediaStreamAudioProcessor::ProcessAndConsumeData(
|
| if (!capture_fifo_->Consume(&process_bus, capture_delay))
|
| return false;
|
|
|
| + // Detect bit-exact repetition of audio present in the captured audio.
|
| + // We detect only one channel.
|
| + if (audio_repetition_detector_) {
|
| + audio_repetition_detector_->Detect(process_bus->bus()->channel(0),
|
| + process_bus->bus()->frames(),
|
| + 1, // number of channels
|
| + input_format_.sample_rate());
|
| + }
|
| +
|
| // Use the process bus directly if audio processing is disabled.
|
| MediaStreamAudioBus* output_bus = process_bus;
|
| *new_volume = 0;
|
|
|