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_local_audio_source_provider.h" | 8 #include "content/renderer/media/webrtc_local_audio_source_provider.h" |
9 #include "content/renderer/media/webrtc_local_audio_track.h" | 9 #include "content/renderer/media/webrtc_local_audio_track.h" |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 int capture_frames = params_.frames_per_buffer(); | 111 int capture_frames = params_.frames_per_buffer(); |
112 int delay_ms = 0; | 112 int delay_ms = 0; |
113 int volume = 0; | 113 int volume = 0; |
114 bool key_pressed = false; | 114 bool key_pressed = false; |
115 while (fifo_->frames() >= capture_frames) { | 115 while (fifo_->frames() >= capture_frames) { |
116 if (source_provider_) { | 116 if (source_provider_) { |
117 source_provider_->GetAudioProcessingParams( | 117 source_provider_->GetAudioProcessingParams( |
118 &delay_ms, &volume, &key_pressed); | 118 &delay_ms, &volume, &key_pressed); |
119 } | 119 } |
120 fifo_->Consume(capture_bus_.get(), 0, capture_frames); | 120 fifo_->Consume(capture_bus_.get(), 0, capture_frames); |
121 track_->Capture(capture_bus_.get(), delay_ms, volume, key_pressed); | 121 // TODO(xians): Convert the format and feed it to the track. |
| 122 // track_->Capture(capture_bus_.get(), delay_ms, volume, key_pressed); |
122 } | 123 } |
123 } | 124 } |
124 | 125 |
125 } // namespace content | 126 } // namespace content |
OLD | NEW |