OLD | NEW |
---|---|
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 "content/renderer/media/webrtc_audio_capturer.h" | 8 #include "content/renderer/media/webrtc_audio_capturer.h" |
9 | 9 |
10 using media::AudioBus; | 10 using media::AudioBus; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 int available = fifo_->max_frames() - fifo_->frames(); | 89 int available = fifo_->max_frames() - fifo_->frames(); |
90 if (available < static_cast<int>(number_of_frames)) { | 90 if (available < static_cast<int>(number_of_frames)) { |
91 LOG(ERROR) << "WebAudioCapturerSource::Consume() : FIFO overrun."; | 91 LOG(ERROR) << "WebAudioCapturerSource::Consume() : FIFO overrun."; |
92 return; | 92 return; |
93 } | 93 } |
94 | 94 |
95 fifo_->Push(wrapper_bus_.get()); | 95 fifo_->Push(wrapper_bus_.get()); |
96 int capture_frames = params_.frames_per_buffer(); | 96 int capture_frames = params_.frames_per_buffer(); |
97 while (fifo_->frames() >= capture_frames) { | 97 while (fifo_->frames() >= capture_frames) { |
98 fifo_->Consume(capture_bus_.get(), 0, capture_frames); | 98 fifo_->Consume(capture_bus_.get(), 0, capture_frames); |
99 callback_->Capture(capture_bus_.get(), 0, 1.0); | 99 callback_->Capture(capture_bus_.get(), 0, 1.0, false); |
tommi (sloooow) - chröme
2013/08/06 10:57:47
Can you add a todo or some comment that explains t
jiayl
2013/08/06 17:24:11
I'm not sure I understand this...the current plan
| |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 } // namespace content | 103 } // namespace content |
OLD | NEW |