Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the data model for WaveShaperNode.curve #65

Closed
olivierthereaux opened this issue Sep 11, 2013 · 5 comments
Closed

Specify the data model for WaveShaperNode.curve #65

olivierthereaux opened this issue Sep 11, 2013 · 5 comments

Comments

@olivierthereaux
Copy link
Contributor

Originally reported on W3C Bugzilla ISSUE-22832 Mon, 29 Jul 2013 18:50:44 GMT
Reported by Ehsan Akhgari [:ehsan]
Assigned to

We need to specify exactly what happens when you set WaveShaperNode.curve to a new array value. Roc's proposal was that we should copy the arrays set to this attribute when it the attribute is set and use the internal copies from that point on so that we don't race with those arrays being modified on the main thread. I support that proposal.

@olivierthereaux
Copy link
Contributor Author

Original comment by Marcus Geelnard (Opera) on W3C Bugzilla. Mon, 05 Aug 2013 13:40:33 GMT

I also support copy-on-assignment, it's the clearest definition. I would prefer a specific set-method though (it would be even clearer IMO), but if backwards compat is important we could do it as suggested by ROC.

@olivierthereaux
Copy link
Contributor Author

Original comment by Ehsan Akhgari [:ehsan] on W3C Bugzilla. Thu, 08 Aug 2013 03:24:10 GMT

I also prefer a setter method to make this clearer (and I don't think a getter method is needed at all, since content code can track the array if it needs to very easily by setting an expando property on the node, etc.)

roc, how much are you worried about the backwards compat issue here?

@cwilso
Copy link
Contributor

cwilso commented Oct 24, 2014

This one is different than the other referenced issues, because it's a Float32Array that's exposed on a persistent object. It would be easier if we had a setter/getter rather than just exposing the Array. Not sure what to do here.

@cwilso cwilso added this to the Web Audio Last Call 1 milestone Oct 30, 2014
@padenot
Copy link
Member

padenot commented Nov 4, 2014

Make an internal copy, and state that subsequent modifications of the Float32Array will not modify the wave shaping curve, but re-setting it will ?

@cwilso
Copy link
Contributor

cwilso commented Nov 4, 2014

yes.

On Tue, Nov 4, 2014 at 4:32 AM, Paul ADENOT notifications@github.com
wrote:

Make an internal copy, and state that subsequent modifications of the
Float32Array will not modify the wave shaping curve, but re-setting it will
?


Reply to this email directly or view it on GitHub
#65 (comment)
.

@joeberkovitz joeberkovitz self-assigned this Oct 8, 2015
joeberkovitz added a commit that referenced this issue Oct 13, 2015
Fix #65 by clarifying copy-on-write behavior of WaveShaperNode.curve.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants