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

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

Powered by Google App Engine
This is Rietveld 408576698