-
Notifications
You must be signed in to change notification settings - Fork 166
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
ConvolverNode: disallow state modification, describe algorithm, clarify language #122
Comments
Much more detail added here: |
The change mostly covers the questions asked. Feedback on the new changes:
|
...additionally, I'd suggest that the buffer + normalize attributes are replaced by a single setImpulseResponse(AudioBuffer buffer, boolean normalize) method. That would make the interface much clearer, and avoid possible problems with modifying the AudioBuffer after setting it. |
Indeed, transferring ownership of the buffer and neutering it would avoid any problems with later modification. |
See #288 for potentially related questions. |
Since #288 is resolved in terms of disallowing ABSN buffer setting dynamically, propose the same approach here: do not allow buffer or normalize flags to be set more than once (and perhaps require them both to be set in a single method) |
I think this makes sense. Some of Marcus' concerns have been fixed with the neutering changes. We need to address the rest of the comments, that are still valid:
Do we still want to add a method to do the setting of the buffer and the normalization in one go, or do we think that this ship has sailed? |
I'd guess that the ship has sailed on the current API, that new method was probably just some wishful thinking on my part :-) About the other comments: I will broaden the title of this issue. |
One fallout of restricting the allocation of the The work around suggested by someone during the WebAudio Conference was to crossfade between two ConvolverNodes. Which kinda works for now. The (long winded) question here would be, in case of the inability to set |
Marking as needing WG review on the next call because this set of decisions is turning out to be non-obvious. There may be yet other solutions worth considering, like allowing buffer/normalize changes but requiring atomic application to the node (this was proposed by Marcus but did not get discussed later in the thread). Any glitching in the current Convolver implementations that is the result of spec problems (as opposed to bugs) please mention in this thread. |
On Mon, May 4, 2015 at 9:57 PM, Chinmay Pendharkar <notifications@github.com
This glitching is why AudioBufferSourceNode's don't allow you to set the I think it makes sense to disallow setting the buffer for a ConvolverNode
Presumably this could be done fairly quickly at which point the old
Ray |
Resolution:
|
I don't think anything needs to be done. The spec already says for
I think this pretty much implies you must set |
Closing as per @rtoy's suggestion |
Audio-ISSUE-72 (ConvolverNodeState): ConvolverNode state modification [Web Audio API]
http://www.w3.org/2011/audio/track/issues/72
Raised by: Philip Jägenstedt
On product: Web Audio API
When buffer and normalize are modified, when does it take effect? If modifications are not applied atomically, it's possible to get spikes (or dropouts) depending on the order of setting and the previous state.
Related: https://www.w3.org/2011/audio/track/issues/28
Further, setting normalize to true is defined using the phrasing "when the buffer atttribute is set", which implies that the order of setting the attributes matters. However, no such order-dependence exists when setting normalize to false.
If an order-dependence is intended, it ought to be changed to either commit atomically after the script thread has finished, or we should have a setter taking both a buffer and a normalize flag.
The text was updated successfully, but these errors were encountered: