Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: content/renderer/media/webaudio_capturer_source.cc

Issue 669393002: Merge 661693003 to M39: Avoid reporting 0 as input level when AudioProcessing zero out the audio da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webaudio_capturer_source.h" 5 #include "content/renderer/media/webaudio_capturer_source.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/renderer/media/webrtc_audio_capturer.h" 9 #include "content/renderer/media/webrtc_audio_capturer.h"
10 #include "content/renderer/media/webrtc_local_audio_track.h" 10 #include "content/renderer/media/webrtc_local_audio_track.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // TODO(xians): remove the flag when supporting one APM per audio track. 120 // TODO(xians): remove the flag when supporting one APM per audio track.
121 // See crbug/264611 for details. 121 // See crbug/264611 for details.
122 bool need_audio_processing = (delay.InMilliseconds() != 0); 122 bool need_audio_processing = (delay.InMilliseconds() != 0);
123 while (fifo_->frames() >= capture_frames) { 123 while (fifo_->frames() >= capture_frames) {
124 fifo_->Consume(capture_bus_.get(), 0, capture_frames); 124 fifo_->Consume(capture_bus_.get(), 0, capture_frames);
125 // TODO(xians): Avoid this interleave/deinterleave operation. 125 // TODO(xians): Avoid this interleave/deinterleave operation.
126 capture_bus_->ToInterleaved(capture_bus_->frames(), 126 capture_bus_->ToInterleaved(capture_bus_->frames(),
127 params_.bits_per_sample() / 8, 127 params_.bits_per_sample() / 8,
128 audio_data_.get()); 128 audio_data_.get());
129 track_->Capture(audio_data_.get(), delay, volume, key_pressed, 129 track_->Capture(audio_data_.get(), delay, volume, key_pressed,
130 need_audio_processing); 130 need_audio_processing, false);
131 } 131 }
132 } 132 }
133 133
134 } // namespace content 134 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698