-
Notifications
You must be signed in to change notification settings - Fork 165
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
Comments
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. |
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? |
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. |
Make an internal copy, and state that subsequent modifications of the Float32Array will not modify the wave shaping curve, but re-setting it will ? |
yes. On Tue, Nov 4, 2014 at 4:32 AM, Paul ADENOT notifications@github.com
|
Fix #65 by clarifying copy-on-write behavior of WaveShaperNode.curve.
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.
The text was updated successfully, but these errors were encountered: