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

Unified Diff: content/renderer/media/audio_hardware.cc

Issue 11880009: Introduce AudioHardwareConfig for renderer side audio device info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style nits. Created 7 years, 11 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/renderer/media/audio_hardware.h ('k') | content/renderer/media/audio_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_hardware.cc
diff --git a/content/renderer/media/audio_hardware.cc b/content/renderer/media/audio_hardware.cc
deleted file mode 100644
index 9f22a2dff1951a5d3fd1cc08a34e43ee89f970ca..0000000000000000000000000000000000000000
--- a/content/renderer/media/audio_hardware.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/media/audio_hardware.h"
-
-#include "base/logging.h"
-#include "content/common/view_messages.h"
-#include "content/renderer/render_thread_impl.h"
-
-using media::ChannelLayout;
-using media::CHANNEL_LAYOUT_NONE;
-
-static int output_sample_rate = 0;
-static int input_sample_rate = 0;
-static size_t output_buffer_size = 0;
-static ChannelLayout input_channel_layout = CHANNEL_LAYOUT_NONE;
-
-namespace content {
-
-int GetAudioOutputSampleRate() {
- DCHECK(RenderThreadImpl::current() != NULL);
-
- if (!output_sample_rate) {
- RenderThreadImpl::current()->Send(
- new ViewHostMsg_GetHardwareSampleRate(&output_sample_rate));
- }
- return output_sample_rate;
-}
-
-int GetAudioInputSampleRate() {
- DCHECK(RenderThreadImpl::current() != NULL);
-
- if (!input_sample_rate) {
- RenderThreadImpl::current()->Send(
- new ViewHostMsg_GetHardwareInputSampleRate(&input_sample_rate));
- }
- return input_sample_rate;
-}
-
-size_t GetAudioOutputBufferSize() {
- DCHECK(RenderThreadImpl::current() != NULL);
-
- if (!output_buffer_size) {
- uint32 buffer_size = 0;
- RenderThreadImpl::current()->Send(
- new ViewHostMsg_GetHardwareBufferSize(&buffer_size));
- output_buffer_size = buffer_size;
- }
-
- return output_buffer_size;
-}
-
-ChannelLayout GetAudioInputChannelLayout() {
- DCHECK(RenderThreadImpl::current() != NULL);
-
- if (input_channel_layout == CHANNEL_LAYOUT_NONE) {
- ChannelLayout layout = CHANNEL_LAYOUT_NONE;
- RenderThreadImpl::current()->Send(
- new ViewHostMsg_GetHardwareInputChannelLayout(&layout));
- input_channel_layout = layout;
- }
-
- return input_channel_layout;
-}
-
-void ResetAudioCache() {
- DCHECK(RenderThreadImpl::current() != NULL);
-
- output_sample_rate = 0.0;
- input_sample_rate = 0.0;
- output_buffer_size = 0;
- input_channel_layout = CHANNEL_LAYOUT_NONE;
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/media/audio_hardware.h ('k') | content/renderer/media/audio_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698