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

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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 if (!audio_renderer_mixer_manager_.get()) { 961 if (!audio_renderer_mixer_manager_.get()) {
962 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( 962 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager(
963 GetAudioHardwareConfig())); 963 GetAudioHardwareConfig()));
964 } 964 }
965 965
966 return audio_renderer_mixer_manager_.get(); 966 return audio_renderer_mixer_manager_.get();
967 } 967 }
968 968
969 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() { 969 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() {
970 if (!audio_hardware_config_) { 970 if (!audio_hardware_config_) {
971 int output_buffer_size; 971 media::AudioParameters input_params;
972 int output_sample_rate; 972 media::AudioParameters output_params;
973 int input_sample_rate;
974 media::ChannelLayout input_channel_layout;
975
976 Send(new ViewHostMsg_GetAudioHardwareConfig( 973 Send(new ViewHostMsg_GetAudioHardwareConfig(
977 &output_buffer_size, &output_sample_rate, 974 &input_params, &output_params));
978 &input_sample_rate, &input_channel_layout));
979 975
980 audio_hardware_config_.reset(new media::AudioHardwareConfig( 976 audio_hardware_config_.reset(new media::AudioHardwareConfig(
981 output_buffer_size, output_sample_rate, input_sample_rate, 977 input_params, output_params));
982 input_channel_layout));
983 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get()); 978 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get());
984 } 979 }
985 980
986 return audio_hardware_config_.get(); 981 return audio_hardware_config_.get();
987 } 982 }
988 983
989 #if defined(OS_WIN) 984 #if defined(OS_WIN)
990 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, 985 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font,
991 const string16& str) { 986 const string16& str) {
992 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str)); 987 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str));
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 1249
1255 void RenderThreadImpl::SetFlingCurveParameters( 1250 void RenderThreadImpl::SetFlingCurveParameters(
1256 const std::vector<float>& new_touchpad, 1251 const std::vector<float>& new_touchpad,
1257 const std::vector<float>& new_touchscreen) { 1252 const std::vector<float>& new_touchscreen) {
1258 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1253 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1259 new_touchscreen); 1254 new_touchscreen);
1260 1255
1261 } 1256 }
1262 1257
1263 } // namespace content 1258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698