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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 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/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 if (!audio_renderer_mixer_manager_.get()) { 973 if (!audio_renderer_mixer_manager_.get()) {
974 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( 974 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager(
975 GetAudioHardwareConfig())); 975 GetAudioHardwareConfig()));
976 } 976 }
977 977
978 return audio_renderer_mixer_manager_.get(); 978 return audio_renderer_mixer_manager_.get();
979 } 979 }
980 980
981 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() { 981 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() {
982 if (!audio_hardware_config_) { 982 if (!audio_hardware_config_) {
983 int output_buffer_size; 983 media::AudioParameters input_params;
984 int output_sample_rate; 984 media::AudioParameters output_params;
985 int input_sample_rate;
986 media::ChannelLayout input_channel_layout;
987
988 Send(new ViewHostMsg_GetAudioHardwareConfig( 985 Send(new ViewHostMsg_GetAudioHardwareConfig(
989 &output_buffer_size, &output_sample_rate, 986 &input_params, &output_params));
990 &input_sample_rate, &input_channel_layout));
991 987
992 audio_hardware_config_.reset(new media::AudioHardwareConfig( 988 audio_hardware_config_.reset(new media::AudioHardwareConfig(
993 output_buffer_size, output_sample_rate, input_sample_rate, 989 input_params, output_params));
994 input_channel_layout));
995 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get()); 990 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get());
996 } 991 }
997 992
998 return audio_hardware_config_.get(); 993 return audio_hardware_config_.get();
999 } 994 }
1000 995
1001 #if defined(OS_WIN) 996 #if defined(OS_WIN)
1002 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, 997 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font,
1003 const string16& str) { 998 const string16& str) {
1004 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str)); 999 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str));
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 1268
1274 void RenderThreadImpl::SetFlingCurveParameters( 1269 void RenderThreadImpl::SetFlingCurveParameters(
1275 const std::vector<float>& new_touchpad, 1270 const std::vector<float>& new_touchpad,
1276 const std::vector<float>& new_touchscreen) { 1271 const std::vector<float>& new_touchscreen) {
1277 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1272 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1278 new_touchscreen); 1273 new_touchscreen);
1279 1274
1280 } 1275 }
1281 1276
1282 } // namespace content 1277 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698