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

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

Issue 8588030: Refactor the Get*Hardware* routines a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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_device.cc ('k') | content/renderer/media/audio_hardware.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_hardware.h
===================================================================
--- content/renderer/media/audio_hardware.h (revision 0)
+++ content/renderer/media/audio_hardware.h (revision 0)
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 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.
+//
+#ifndef CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_
+#define CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+
+// Contains static methods to query hardware properties from the browser
+// process. Values are cached to avoid unnecessary round trips, but the cache
+// can be cleared if needed (currently only used by tests).
+namespace audio_hardware {
+
+// Fetch the sample rate of the default audio output end point device.
+// Must be called from RenderThreadImpl::current().
+CONTENT_EXPORT double GetOutputSampleRate();
+
+// Fetch the sample rate of the default audio input end point device.
+// Must be called from RenderThreadImpl::current().
+CONTENT_EXPORT double GetInputSampleRate();
+
+// Fetch the buffer size we use for the default output device.
+// Must be called from RenderThreadImpl::current().
+CONTENT_EXPORT size_t GetOutputBufferSize();
+
+// Forces the next call to any of the Get functions to query the hardware
+// and repopulate the cache.
+CONTENT_EXPORT void ResetCache();
+} // namespace audio_hardware
+
+#endif // CONTENT_RENDERER_MEDIA_AUDIO_HARDWARE_H_
Property changes on: content\renderer\media\audio_hardware.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/renderer/media/audio_device.cc ('k') | content/renderer/media/audio_hardware.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698