[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
Fri Sep 16 15:22:22 PDT 2011


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





--- Comment #23 from Chris Rogers <crogers at google.com>  2011-09-16 15:22:22 PST ---
(In reply to comment #22)
> (From update of attachment 107710 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=107710&action=review
> 
> >> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:47
> >> +const size_t minimumCallbackBufferSize = 128;
> > 
> > I wouldn't create a new constant here, but instead use the already existing constant "renderBufferSize"
> 
> Although they have the same value, they're conceptually different things.  Do you think overloading the meaning is appropriate?

The problem with having two different constants is that one could be changed, and the other value would no longer be consistent.  I think two values would be more bug prone.  If you really wanted two constants then you could define one in terms of the other (equal to the other).  But this really seems overkill.


> 
> >> Source/WebKit/chromium/src/AudioDestinationChromium.cpp:74
> >> +    ASSERT((minimumCallbackBuffersize <= m_callbackBuffersize)
> > 
> > I would suggest something like this:
> > 
> > bool isSizeGood = m_callbackBuffersize >= renderBufferSize && m_callbackBuffersize <= maximumCallbackBufferSize;
> > ASSERT(isSizeGood);
> > if (!isSizeGood)
> >     return;
> 
> Yes, I'll do this in the next patch.

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