This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17359 - (ConvolverNodeState): ConvolverNode state modification
Summary: (ConvolverNodeState): ConvolverNode state modification
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 11:48 UTC by Philip Jägenstedt
Modified: 2014-10-28 17:16 UTC (History)
3 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-06-05 11:48:20 UTC
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.
Comment 1 Chris Rogers 2012-06-08 23:06:38 UTC
Much more detail added here:
https://dvcs.w3.org/hg/audio/rev/4df179094971
Comment 2 Marcus Geelnard (Opera) 2012-06-12 09:13:59 UTC
The change mostly covers the questions asked. Feedback on the new changes:

- The algorithm defined in the C++ (?) function calculateNormalizationScale would be much better defined in pseudo code, and could probably be more compact. The code also seems to depend on internal data structures specific to a particular implementation.

- The text "A mono, stereo, or 4-channel <code>AudioBuffer</code> containing the (possibly multi-channel) impulse response" is confusing. What does "possibly multi-channel" mean in this context? Can a mono AudioBuffer be multi-channel?

- Editorial: "Normative requirements for multi-channel convolution matrixing are described <a href="#Convolution-reverb-effect">here</a>". Please don't use "here"-links.

- It is unspecified what should happen if you first set the buffer attribute to an AudioBuffer "buf", and later make changes to your locally referenced "buf" (or, for that matter, make modifications directly to the array returned by buffer.getChannelData(k)).
Comment 3 Marcus Geelnard (Opera) 2012-06-12 09:19:09 UTC
...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.
Comment 4 Philip Jägenstedt 2012-06-12 09:41:54 UTC
Indeed, transferring ownership of the buffer and neutering it would avoid any problems with later modification.
Comment 5 Olivier Thereaux 2014-10-28 17:13:40 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 6 Olivier Thereaux 2014-10-28 17:16:34 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.