Bug 1228207 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Bug 1226481 comment 7 suggests using setValueAtTime(currentValue, currentTime)
and linearRampToValueAtTime(newValue, currentTime + fadeDuration) to fade
audio in a Web Audio graph, but this only works for very long fade durations,
due to the problems described in [1].

In bug 943138, the solution chosen was to use and AudioBufferSourceNode with the
desired envelope and connect to the gain.  This is a little complicated
however, and having to specify a buffer of sample values seems unfortunate
with longer transition durations.

[1] https://lists.w3.org/Archives/Public/public-audio/2013OctDec/0286.html
Bug 1226481 comment 7 suggests using setValueAtTime(currentValue, currentTime)
and linearRampToValueAtTime(newValue, currentTime + fadeDuration) to fade
audio in a Web Audio graph, but this only works for very long fade durations,
due to the problems described in [1].

In bug 943138, the solution chosen was to use an AudioBufferSourceNode with the
desired envelope and connect to the gain.  This is a little complicated
however, and having to specify a buffer of sample values seems unfortunate
with longer transition durations.

[1] https://lists.w3.org/Archives/Public/public-audio/2013OctDec/0286.html

Back to Bug 1228207 Comment 0