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

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: Rebase ToT 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..934bd6a01712145a04178a8e7728013f032ab65a 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();
@@ -33,6 +38,7 @@ CONTENT_EXPORT uint32 GetInputChannelCount();
// 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_
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host_unittest.cc ('k') | content/renderer/media/audio_hardware.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698