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

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

Issue 9442005: Clean up audio-related utility functions to compute buffer sizes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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
Index: content/renderer/media/audio_hardware.h
diff --git a/content/renderer/media/audio_hardware.h b/content/renderer/media/audio_hardware.h
index ea9a28a61ed57b4f7b8c0c293b34ef93e3d62ac2..19edb8cb2e426efa89fdfdda0f32976e6afd29d6 100644
--- a/content/renderer/media/audio_hardware.h
+++ b/content/renderer/media/audio_hardware.h
@@ -24,8 +24,13 @@ CONTENT_EXPORT double GetInputSampleRate();
// Fetch the buffer size we use for the default output device.
// Must be called from RenderThreadImpl::current().
+// Must be used in conjunction with AUDIO_PCM_LOW_LATENCY.
CONTENT_EXPORT size_t GetOutputBufferSize();
+// Computes a buffer size based on the given |sample_rate|. Must be used in
+// conjunction with AUDIO_PCM_LINEAR.
+CONTENT_EXPORT size_t GetHighLatencyOutputBufferSize(int sample_rate);
+
// Fetch the number of audio channels for the default input device.
// Must be called from RenderThreadImpl::current().
CONTENT_EXPORT uint32 GetInputChannelCount();

Powered by Google App Engine
This is Rietveld 408576698