[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
Mon Sep 12 16:19:16 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=67952





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

> Source/WebKit/chromium/ChangeLog:13
> +        Call hardwareAudioBufferSize to get buffer size; update 

minor nit: this function name should be: audioHardwareBufferSize()

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

We need to round m_callbackBufferSize to an even multiple of renderBufferSize.  It's not sufficient to make the calculation only involve m_renderCountPerCallback below.  This is because when we call createAudioDevice() we need to pass in a buffer size which is of the proper multiple, otherwise the rendering will not work correctly in render()

> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:65
> +    // renderBufferSize.

very minor nit: I'd not wrap this comment and instead keep it on a single line

> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:68
> +    m_audioDevice = adoptPtr(webKitPlatformSupport()->createAudioDevice(m_callbackBufferSize, numberOfChannels, sampleRate, this));

But, m_callbackBufferSize *must* be evenly divisible by renderBufferSize since otherwise we won't render properly each time the render() method is called.

> Source/WebKit/chromium/src/AudioDestinationChromium.h:64
> +    unsigned m_renderCountPerCallback;

To be consistent with what audioHardwareBufferSize() returns we should change "unsigned" -> "size_t"

-- 
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