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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 12662038: Revert 187936 "Pass more detailed audio hardware configuration i..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1440/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
===================================================================
--- content/browser/renderer_host/render_message_filter.cc (revision 189875)
+++ content/browser/renderer_host/render_message_filter.cc (working copy)
@@ -33,7 +33,6 @@
#include "content/common/child_process_host_impl.h"
#include "content/common/child_process_messages.h"
#include "content/common/desktop_notification_messages.h"
-#include "content/common/media/media_param_traits.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -779,18 +778,22 @@
*cpu_usage = cpu_usage_;
}
+// TODO(xians): refactor the API to return input and output AudioParameters.
void RenderMessageFilter::OnGetAudioHardwareConfig(
- media::AudioParameters* input_params,
- media::AudioParameters* output_params) {
- DCHECK(input_params);
- DCHECK(output_params);
+ int* output_buffer_size, int* output_sample_rate, int* input_sample_rate,
+ media::ChannelLayout* input_channel_layout) {
media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
- *output_params = audio_manager->GetDefaultOutputStreamParameters();
+ const media::AudioParameters output_parameters =
+ audio_manager->GetDefaultOutputStreamParameters();
+ *output_buffer_size = output_parameters.frames_per_buffer();
+ *output_sample_rate = output_parameters.sample_rate();
// TODO(henrika): add support for all available input devices.
- *input_params =
+ const media::AudioParameters input_parameters =
audio_manager->GetInputStreamParameters(
media::AudioManagerBase::kDefaultDeviceId);
+ *input_sample_rate = input_parameters.sample_rate();
+ *input_channel_layout = input_parameters.channel_layout();
}
void RenderMessageFilter::OnGetMonitorColorProfile(std::vector<char>* profile) {
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698