diff options
author | rtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 05:29:18 +0000 |
---|---|---|
committer | rtoy@google.com <rtoy@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 05:29:18 +0000 |
commit | 441ec4dc183c1c6c4f303855aaeea75cb60074fe (patch) | |
tree | 712e21b89b7b15c0c9a8cd31b5fb962179c06c66 /media/audio/audio_util.h | |
parent | 5fa278c10430a00706d0e296216b4c9543bacbc7 (diff) | |
download | chromium_src-441ec4dc183c1c6c4f303855aaeea75cb60074fe.zip chromium_src-441ec4dc183c1c6c4f303855aaeea75cb60074fe.tar.gz chromium_src-441ec4dc183c1c6c4f303855aaeea75cb60074fe.tar.bz2 |
Add API to query for the audio buffer size.
This is essentially identical to the GetAudioHardwareSampleRate API, except
we get the "optimal" hardware buffer size to be used.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/7837030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_util.h')
-rw-r--r-- | media/audio/audio_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/audio/audio_util.h b/media/audio/audio_util.h index e9452b2..6ea697b 100644 --- a/media/audio/audio_util.h +++ b/media/audio/audio_util.h @@ -82,6 +82,11 @@ MEDIA_EXPORT void InterleaveFloatToInt16(const std::vector<float*>& source, // Returns the default audio hardware sample-rate. MEDIA_EXPORT double GetAudioHardwareSampleRate(); +// Returns the optimal low-latency buffer size for the audio hardware. +// This is the smallest buffer size the system can comfortably render +// at without glitches. The buffer size is in sample-frames. +MEDIA_EXPORT size_t GetAudioHardwareBufferSize(); + // Functions that handle data buffer passed between processes in the shared // memory. Called on both IPC sides. |