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

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

Issue 2908073002: Make OS audio buffer size limits visible. (Closed)
Patch Set: Updates based on reviewer feedback. 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/audio_latency.cc ('K') | « media/base/mac/audio_util_mac.cc ('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.
hongchan 2017/06/15 16:22:03 Could you file a bug and add the URL in your comme
Andrew MacPherson 2017/06/19 12:36:18 No problem, I'll take care of this when I push the
const size_t kFIFOSize = 8192;
o1ka 2017/06/15 15:33:37 Should we set it to limits::kMaxAudioBufferSize? O
Andrew MacPherson 2017/06/19 12:36:18 It would need to be kMaxAudioBufferSize + AudioUti
std::unique_ptr<AudioDestination> AudioDestination::Create(
« media/base/audio_latency.cc ('K') | « media/base/mac/audio_util_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698