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

Side by Side Diff: media/audio/pulse/audio_manager_pulse.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
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/pulse/audio_manager_pulse.h" 5 #include "media/audio/pulse/audio_manager_pulse.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } else { 174 } else {
175 sample_rate = GetNativeSampleRate(); 175 sample_rate = GetNativeSampleRate();
176 } 176 }
177 177
178 int user_buffer_size = GetUserBufferSize(); 178 int user_buffer_size = GetUserBufferSize();
179 if (user_buffer_size) 179 if (user_buffer_size)
180 buffer_size = user_buffer_size; 180 buffer_size = user_buffer_size;
181 181
182 return AudioParameters( 182 return AudioParameters(
183 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels, 183 AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, input_channels,
184 sample_rate, bits_per_sample, buffer_size); 184 sample_rate, bits_per_sample, buffer_size, AudioParameters::NO_EFFECTS);
185 } 185 }
186 186
187 AudioOutputStream* AudioManagerPulse::MakeOutputStream( 187 AudioOutputStream* AudioManagerPulse::MakeOutputStream(
188 const AudioParameters& params, const std::string& input_device_id) { 188 const AudioParameters& params, const std::string& input_device_id) {
189 if (params.input_channels()) { 189 if (params.input_channels()) {
190 return new PulseAudioUnifiedStream(params, input_device_id, this); 190 return new PulseAudioUnifiedStream(params, input_device_id, this);
191 } 191 }
192 192
193 return new PulseAudioOutputStream(params, this); 193 return new PulseAudioOutputStream(params, this);
194 } 194 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context, 325 void AudioManagerPulse::SampleRateInfoCallback(pa_context* context,
326 const pa_server_info* info, 326 const pa_server_info* info,
327 void* user_data) { 327 void* user_data) {
328 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data); 328 AudioManagerPulse* manager = reinterpret_cast<AudioManagerPulse*>(user_data);
329 329
330 manager->native_input_sample_rate_ = info->sample_spec.rate; 330 manager->native_input_sample_rate_ = info->sample_spec.rate;
331 pa_threaded_mainloop_signal(manager->input_mainloop_, 0); 331 pa_threaded_mainloop_signal(manager->input_mainloop_, 0);
332 } 332 }
333 333
334 } // namespace media 334 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/openbsd/audio_manager_openbsd.cc ('k') | media/audio/win/audio_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698