Chromium Code Reviews
DescriptionScriptProcessor buffer size should be consistent with callback size
When selecting a buffer size for a ScriptProcessorNode (when
constructed using a requested size of 0), the selected size needs to
be consistent with the actuall callback buffer size of the
AudioContext. Previously, the value was based on the audio hardware
size, which could be very small (128 or 256) on some Android devices,
but the actual callback size is much larger (1024 or 2048). This
causes glitching because we will fire the process event back-to-back
because of the multiple calls ot process() to satisfy the callback
buffer size.
Thus, add appropriate interfaces so that an AudioContext (and
BaseAudioContext) can get the callback buffer size from the
AudioDestination.
Also, for an offline context, we can just always return a value of 256
(the smallest) for the buffer size. There is no constraint here
because the offline context waits for the ScriptProcessor to finish
before continuing.
BUG=673854
TEST=
Committed: https://crrev.com/94c37e9181e0619415e8f4d2be3f631b44fe2e64
Cr-Commit-Position: refs/heads/master@{#439927}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Make callbackBufferSize pure virtual #Messages
Total messages: 18 (10 generated)
|