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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioDestination.cpp

Issue 2908073002: Make OS audio buffer size limits visible. (Closed)
Patch Set: Different approach as suggested by olka. Created 3 years, 6 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
« media/base/limits.h ('K') | « media/base/limits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/AudioDestination.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
index 39d569fd56ae9f8ab1156cca8e02ef89622fce06..1cb314629ccd716377cb69f24477cd1a19be0f1d 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
@@ -50,6 +50,12 @@ namespace blink {
// that we would ever need. The current UMA stats indicates that this is, in
// fact, probably too small. There are Android devices out there with a size of
// 8000 or so. We might need to make this larger. See: crbug.com/670747
+// TODO(andrew.macpherson): This either needs to be bigger since some OSes allow
+// buffer sizes of 8192 via latencyHint now or else we need to do some
+// validation of the latencyHint 'exact' size before passing it to
+// CreateAudioDevice. Clamping may be tricky though as the buffer size is
+// dependent on the sample rate for some platforms and we're passing in a time
+// value and not a buffer size in the latencyHint.
const size_t kFIFOSize = 8192;
std::unique_ptr<AudioDestination> AudioDestination::Create(
« media/base/limits.h ('K') | « media/base/limits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698