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

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

Issue 37793005: move the APM to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 | Annotate | Revision Log
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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698