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 56d9570720d5eb9f97005203956ca652b0b010be..a2f08920089005e427032ca9f44a66e58cf8d0a1 100644 |
--- a/content/renderer/media/media_stream_audio_processor.cc |
+++ b/content/renderer/media/media_stream_audio_processor.cc |
@@ -239,6 +239,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), |
@@ -298,6 +299,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_) { |
ajm
2015/09/30 00:23:43
Why do you need to check this?
minyue
2015/09/30 19:52:32
Good point. Tommi asked about whether audio_repeti
|
+ 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; |