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

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

Issue 518433002: Revert of Revert of Remove the last piece of deprecated synchronous IO code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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/audio_message_filter.h" 5 #include "content/renderer/media/audio_message_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "content/common/media/audio_messages.h" 10 #include "content/common/media/audio_messages.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // TODO(crogers): fix OnOutputDeviceChanged() to pass AudioParameters. 227 // TODO(crogers): fix OnOutputDeviceChanged() to pass AudioParameters.
228 media::ChannelLayout channel_layout = 228 media::ChannelLayout channel_layout =
229 audio_hardware_config_->GetOutputChannelLayout(); 229 audio_hardware_config_->GetOutputChannelLayout();
230 int channels = audio_hardware_config_->GetOutputChannels(); 230 int channels = audio_hardware_config_->GetOutputChannels();
231 231
232 media::AudioParameters output_params; 232 media::AudioParameters output_params;
233 output_params.Reset( 233 output_params.Reset(
234 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, 234 media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
235 channel_layout, 235 channel_layout,
236 channels, 236 channels,
237 0,
238 new_sample_rate, 237 new_sample_rate,
239 16, 238 16,
240 new_buffer_size); 239 new_buffer_size);
241 240
242 audio_hardware_config_->UpdateOutputConfig(output_params); 241 audio_hardware_config_->UpdateOutputConfig(output_params);
243 } 242 }
244 243
245 void AudioMessageFilter::SetAudioHardwareConfig( 244 void AudioMessageFilter::SetAudioHardwareConfig(
246 media::AudioHardwareConfig* config) { 245 media::AudioHardwareConfig* config) {
247 base::AutoLock auto_lock(lock_); 246 base::AutoLock auto_lock(lock_);
248 audio_hardware_config_ = config; 247 audio_hardware_config_ = config;
249 } 248 }
250 249
251 } // namespace content 250 } // namespace content
OLDNEW
« no previous file with comments | « content/common/media/media_param_traits.cc ('k') | content/renderer/media/webaudio_capturer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698