[Webkit-unassigned] [Bug 67952] Ask for audio hardware buffer size instead of using hardwired constants.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 13 12:06:04 PDT 2011


--- Comment #7 from Chris Rogers <crogers at google.com>  2011-09-13 12:06:04 PST ---
(From update of attachment 107201)
View in context: https://bugs.webkit.org/attachment.cgi?id=107201&action=review

> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:61
> +    m_callbackBufferSize = webKitPlatformSupport()->audioHardwareBufferSize();

I would add a comment here saying something like "Get the minimum usable buffer size. We'll round this value up to a multiple of our render size.
Just to be extra careful, it would be a good idea to compare this value and make sure it's within a certain reasonable range.

I would propose creating a "const size_t maxCallbackBufferSize = 16384;" near the top of the file then check with an ASSERT:
ASSERT(m_callbackBufferSize <= maxCallbackBufferSize);

> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:64
> +    // needed.

nit: no need to wrap this comment on two lines.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list