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

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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 if (!audio_renderer_mixer_manager_.get()) { 909 if (!audio_renderer_mixer_manager_.get()) {
910 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager( 910 audio_renderer_mixer_manager_.reset(new AudioRendererMixerManager(
911 GetAudioHardwareConfig())); 911 GetAudioHardwareConfig()));
912 } 912 }
913 913
914 return audio_renderer_mixer_manager_.get(); 914 return audio_renderer_mixer_manager_.get();
915 } 915 }
916 916
917 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() { 917 media::AudioHardwareConfig* RenderThreadImpl::GetAudioHardwareConfig() {
918 if (!audio_hardware_config_) { 918 if (!audio_hardware_config_) {
919 int output_buffer_size; 919 media::AudioParameters input_params;
920 int output_sample_rate; 920 media::AudioParameters output_params;
921 int input_sample_rate;
922 media::ChannelLayout input_channel_layout;
923
924 Send(new ViewHostMsg_GetAudioHardwareConfig( 921 Send(new ViewHostMsg_GetAudioHardwareConfig(
925 &output_buffer_size, &output_sample_rate, 922 &input_params, &output_params));
926 &input_sample_rate, &input_channel_layout));
927 923
928 audio_hardware_config_.reset(new media::AudioHardwareConfig( 924 audio_hardware_config_.reset(new media::AudioHardwareConfig(
929 output_buffer_size, output_sample_rate, input_sample_rate, 925 input_params, output_params));
930 input_channel_layout));
931 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get()); 926 audio_message_filter_->SetAudioHardwareConfig(audio_hardware_config_.get());
932 } 927 }
933 928
934 return audio_hardware_config_.get(); 929 return audio_hardware_config_.get();
935 } 930 }
936 931
937 #if defined(OS_WIN) 932 #if defined(OS_WIN)
938 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font, 933 void RenderThreadImpl::PreCacheFontCharacters(const LOGFONT& log_font,
939 const string16& str) { 934 const string16& str) {
940 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str)); 935 Send(new ViewHostMsg_PreCacheFontCharacters(log_font, str));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1196
1202 void RenderThreadImpl::SetFlingCurveParameters( 1197 void RenderThreadImpl::SetFlingCurveParameters(
1203 const std::vector<float>& new_touchpad, 1198 const std::vector<float>& new_touchpad,
1204 const std::vector<float>& new_touchscreen) { 1199 const std::vector<float>& new_touchscreen) {
1205 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1200 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1206 new_touchscreen); 1201 new_touchscreen);
1207 1202
1208 } 1203 }
1209 1204
1210 } // namespace content 1205 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698