WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48875
Add JavaScriptAudioNode files
https://bugs.webkit.org/show_bug.cgi?id=48875
Summary
Add JavaScriptAudioNode files
Chris Rogers
Reported
2010-11-02 15:07:12 PDT
Add JavaScriptAudioNode files
Attachments
Patch
(19.21 KB, patch)
2010-11-02 15:08 PDT
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Patch
(19.49 KB, patch)
2010-11-09 17:20 PST
,
Chris Rogers
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Rogers
Comment 1
2010-11-02 15:08:55 PDT
Created
attachment 72747
[details]
Patch
Chris Rogers
Comment 2
2010-11-02 15:11:12 PDT
Implements JavaScriptAudioNode as described in the web audio specification:
http://chromium.googlecode.com/svn/trunk/samples/audio/specification/specification.html#JavaScriptAudioNode-section
Kenneth Russell
Comment 3
2010-11-08 16:41:01 PST
Comment on
attachment 72747
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=72747&action=review
This looks good overall; I went through the bounds checking assertions carefully and they all look correct. Because of the potential deletion issue before the callback is called, I'm marking it r-.
> WebCore/webaudio/JavaScriptAudioNode.cpp:101 > + m_outputBuffers.append(AudioBuffer::create(2, bufferSize(), sampleRate));
This could be a loop to reduce duplicated code.
> WebCore/webaudio/JavaScriptAudioNode.cpp:200 > + callOnMainThread(fireProcessEventDispatch, this);
Some sort of guard is needed to ensure that this node isn't deallocated by the time fireProcessEventDispatch is called. Perhaps you could increment one of the node's reference counts here and decrement it in the callback.
> WebCore/webaudio/JavaScriptAudioNode.h:57 > + return adoptRef(new JavaScriptAudioNode(context, sampleRate, bufferSize, numberOfInputs, numberOfOutputs));
Unless there's a strong reason to inline this, move the body to the .cpp.
Chris Rogers
Comment 4
2010-11-09 17:20:39 PST
Created
attachment 73440
[details]
Patch
Chris Rogers
Comment 5
2010-11-09 17:22:18 PST
Comment on
attachment 72747
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=72747&action=review
>> WebCore/webaudio/JavaScriptAudioNode.cpp:101 >> + m_outputBuffers.append(AudioBuffer::create(2, bufferSize(), sampleRate)); > > This could be a loop to reduce duplicated code.
FIXED
>> WebCore/webaudio/JavaScriptAudioNode.cpp:200 >> + callOnMainThread(fireProcessEventDispatch, this); > > Some sort of guard is needed to ensure that this node isn't deallocated by the time fireProcessEventDispatch is called. Perhaps you could increment one of the node's reference counts here and decrement it in the callback.
I added a call to ref() and corresponding call to deref() to avoid a possible problem here.
>> WebCore/webaudio/JavaScriptAudioNode.h:57 >> + return adoptRef(new JavaScriptAudioNode(context, sampleRate, bufferSize, numberOfInputs, numberOfOutputs)); > > Unless there's a strong reason to inline this, move the body to the .cpp.
FIXED
Kenneth Russell
Comment 6
2010-11-09 18:09:33 PST
Comment on
attachment 73440
[details]
Patch Looks good to me.
WebKit Commit Bot
Comment 7
2010-11-09 21:56:10 PST
Comment on
attachment 73440
[details]
Patch Clearing flags on attachment: 73440 Committed
r71719
: <
http://trac.webkit.org/changeset/71719
>
WebKit Commit Bot
Comment 8
2010-11-09 21:56:15 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug