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

Side by Side Diff: media/audio/audio_manager_base.cc

Issue 1130063002: Allowing a custom audio buffer size in WebRtcAudioCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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 "media/audio/audio_manager_base.h" 5 #include "media/audio/audio_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return NULL; 193 return NULL;
194 } 194 }
195 195
196 if (num_input_streams_ >= max_num_input_streams_) { 196 if (num_input_streams_ >= max_num_input_streams_) {
197 DLOG(ERROR) << "Number of opened input audio streams " 197 DLOG(ERROR) << "Number of opened input audio streams "
198 << num_input_streams_ 198 << num_input_streams_
199 << " exceed the max allowed number " << max_num_input_streams_; 199 << " exceed the max allowed number " << max_num_input_streams_;
200 return NULL; 200 return NULL;
201 } 201 }
202 202
203 LOG(INFO) << "Creating a new AudioInputStream with buffer size = "
Charlie 2015/05/06 23:47:44 Disregard this statement. It's a temporary testing
204 << params.frames_per_buffer();
205
203 AudioInputStream* stream; 206 AudioInputStream* stream;
204 switch (params.format()) { 207 switch (params.format()) {
205 case AudioParameters::AUDIO_PCM_LINEAR: 208 case AudioParameters::AUDIO_PCM_LINEAR:
206 stream = MakeLinearInputStream(params, device_id); 209 stream = MakeLinearInputStream(params, device_id);
207 break; 210 break;
208 case AudioParameters::AUDIO_PCM_LOW_LATENCY: 211 case AudioParameters::AUDIO_PCM_LOW_LATENCY:
209 stream = MakeLowLatencyInputStream(params, device_id); 212 stream = MakeLowLatencyInputStream(params, device_id);
210 break; 213 break;
211 case AudioParameters::AUDIO_FAKE: 214 case AudioParameters::AUDIO_FAKE:
212 stream = FakeAudioInputStream::MakeFakeStream(this, params); 215 stream = FakeAudioInputStream::MakeFakeStream(this, params);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( 403 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog(
401 AudioLogFactory::AudioComponent component) { 404 AudioLogFactory::AudioComponent component) {
402 return audio_log_factory_->CreateAudioLog(component); 405 return audio_log_factory_->CreateAudioLog(component);
403 } 406 }
404 407
405 void AudioManagerBase::SetHasKeyboardMic() { 408 void AudioManagerBase::SetHasKeyboardMic() {
406 NOTREACHED(); 409 NOTREACHED();
407 } 410 }
408 411
409 } // namespace media 412 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698