[Webkit-unassigned] [Bug 138739] start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 18 09:40:12 PST 2014


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

--- Comment #7 from Philippe Normand <pnormand at igalia.com> ---
(In reply to comment #6)
> Comment on attachment 241704 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241704&action=review
> 
> Not sure this code has enough test coverage.
> 

I think we need a major update of our WebAudio implementation in general. We've fallen quite behind the spec :(

> > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:375
> > +    startPlaying(BufferPlaybackMode::Entire, 0, 0, buffer() ? buffer()->duration() : 0, ec);
> 
> The syntax here doesn’t seem quite right. Since BufferPlaybackMode is just
> an enum, not an enum class, we don’t need the enum name qualifier. Maybe it
> was intended to be an enum class?
> 

I somehow got the habit of using enums in C++ as enum classes but yeah I can drop the enum qualifier.

> > Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp:457
> > +    // Handle unspecified duration where 0 means the rest of the buffer.
> > +    if (!grainDuration)
> > +        grainDuration = buffer()->duration();
> 
> I don’t understand the mention of “unspecified” here and “0”. Where is the
> code that turns unspecified into 0? Or is 0 a magic value?
> 

A 0-duration means the whole buffer should be played, if I understand the spec correctly.

Thanks for the review Darin, I'll upload the patch-for-landing so EWS can check it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141118/e17e7091/attachment-0002.html>


More information about the webkit-unassigned mailing list