[Webkit-unassigned] [Bug 47624] Add AudioResamplerKernel files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 27 12:07:03 PDT 2010


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





--- Comment #3 from Chris Rogers <crogers at google.com>  2010-10-27 12:07:02 PST ---
(From update of attachment 70667)
View in context: https://bugs.webkit.org/attachment.cgi?id=70667&action=review

>> WebCore/platform/audio/AudioResamplerKernel.cpp:59
>> +    int endIndex = static_cast<int>(nextFractionalIndex + 1.0); // round up to next integer index
> 
> Should this just use ceil()?

ceil() doesn't have quite the same behavior.  For example ceil(1.0) == 1.0, but we need the value 2 since we need to have one sample *past* the rounded-down version.

>> WebCore/platform/audio/AudioResamplerKernel.cpp:102
>> +        double sample2 = source[readIndex + 1];
> 
> It would be really nice to have some assertions (perhaps hoisted out of the loop) that m_virtualReadIndex + (framesToProcess * rate) + 1 is not going to walk off the end of the source buffer.

FIXED: added some assertions before entering the loop.

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