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

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

Issue 9691001: Audio software mixer. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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/webrtc_audio_device_impl.h" 5 #include "content/renderer/media/webrtc_audio_device_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/renderer/media/audio_hardware.h" 10 #include "content/renderer/media/audio_hardware.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 in_buffer_size = 2 * 480; 428 in_buffer_size = 2 * 480;
429 out_buffer_size = 480; 429 out_buffer_size = 480;
430 #else 430 #else
431 DLOG(ERROR) << "Unsupported platform"; 431 DLOG(ERROR) << "Unsupported platform";
432 return -1; 432 return -1;
433 #endif 433 #endif
434 434
435 // Store utilized parameters to ensure that we can check them 435 // Store utilized parameters to ensure that we can check them
436 // after a successful initialization. 436 // after a successful initialization.
437 output_audio_parameters_.Reset( 437 output_audio_parameters_.Reset(
438 AudioParameters::AUDIO_PCM_LOW_LATENCY, out_channel_layout, 438 AudioParameters::AUDIO_PCM_LOW_LATENCY, false, out_channel_layout,
439 out_sample_rate, 16, out_buffer_size); 439 out_sample_rate, 16, out_buffer_size);
440 440
441 input_audio_parameters_.Reset( 441 input_audio_parameters_.Reset(
442 in_format, input_channel_layout, in_sample_rate, 442 in_format, false, input_channel_layout, in_sample_rate,
443 16, in_buffer_size); 443 16, in_buffer_size);
444 444
445 // Create and configure the audio capturing client. 445 // Create and configure the audio capturing client.
446 audio_input_device_ = new AudioInputDevice( 446 audio_input_device_ = new AudioInputDevice(
447 input_audio_parameters_, this, this); 447 input_audio_parameters_, this, this);
448 448
449 // Create and configure the audio rendering client. 449 // Create and configure the audio rendering client.
450 audio_output_device_ = new AudioDevice(output_audio_parameters_, this); 450 audio_output_device_ = new AudioDevice(output_audio_parameters_, this);
451 451
452 DCHECK(audio_input_device_); 452 DCHECK(audio_input_device_);
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 } 988 }
989 989
990 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { 990 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const {
991 NOTIMPLEMENTED(); 991 NOTIMPLEMENTED();
992 return -1; 992 return -1;
993 } 993 }
994 994
995 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { 995 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) {
996 session_id_ = session_id; 996 session_id_ = session_id;
997 } 997 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698