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

Side by Side Diff: media/audio/win/audio_manager_win.cc

Issue 115413002: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years 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_io.h" 5 #include "media/audio/audio_io.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <objbase.h> // This has to be before initguid.h 8 #include <objbase.h> // This has to be before initguid.h
9 #include <initguid.h> 9 #include <initguid.h>
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 sample_rate = input_params.sample_rate(); 496 sample_rate = input_params.sample_rate();
497 } 497 }
498 } 498 }
499 499
500 int user_buffer_size = GetUserBufferSize(); 500 int user_buffer_size = GetUserBufferSize();
501 if (user_buffer_size) 501 if (user_buffer_size)
502 buffer_size = user_buffer_size; 502 buffer_size = user_buffer_size;
503 503
504 return AudioParameters( 504 return AudioParameters(
505 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels, 505 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels,
506 sample_rate, bits_per_sample, buffer_size); 506 sample_rate, bits_per_sample, buffer_size, AudioParameters::NO_EFFECTS);
507 } 507 }
508 508
509 AudioInputStream* AudioManagerWin::CreatePCMWaveInAudioInputStream( 509 AudioInputStream* AudioManagerWin::CreatePCMWaveInAudioInputStream(
510 const AudioParameters& params, 510 const AudioParameters& params,
511 const std::string& device_id) { 511 const std::string& device_id) {
512 std::string xp_device_id = device_id; 512 std::string xp_device_id = device_id;
513 if (device_id != AudioManagerBase::kDefaultDeviceId && 513 if (device_id != AudioManagerBase::kDefaultDeviceId &&
514 enumeration_type_ == kMMDeviceEnumeration) { 514 enumeration_type_ == kMMDeviceEnumeration) {
515 xp_device_id = ConvertToWinXPInputDeviceId(device_id); 515 xp_device_id = ConvertToWinXPInputDeviceId(device_id);
516 if (xp_device_id.empty()) { 516 if (xp_device_id.empty()) {
517 DLOG(ERROR) << "Cannot find a waveIn device which matches the device ID " 517 DLOG(ERROR) << "Cannot find a waveIn device which matches the device ID "
518 << device_id; 518 << device_id;
519 return NULL; 519 return NULL;
520 } 520 }
521 } 521 }
522 522
523 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers, 523 return new PCMWaveInAudioInputStream(this, params, kNumInputBuffers,
524 xp_device_id); 524 xp_device_id);
525 } 525 }
526 526
527 /// static 527 /// static
528 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) { 528 AudioManager* CreateAudioManager(AudioLogFactory* audio_log_factory) {
529 return new AudioManagerWin(audio_log_factory); 529 return new AudioManagerWin(audio_log_factory);
530 } 530 }
531 531
532 } // namespace media 532 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/pulse/audio_manager_pulse.cc ('k') | media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698