Setting AudioBufferSourceNode's buffer detaches channelData Float32Array
Categories
(Core :: Web Audio, defect)
Tracking
()
People
(Reporter: bartel.wilhelm, Unassigned)
References
(Depends on 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0
Steps to reproduce:
see code and demo: https://github.com/RSWilli/audiobuffer-firefox-bug-repro
- extract channelData from an existing AudioBuffer x
- set the buffer of an AudioBufferSourceNode to x
Actual results:
after 2. the Float32Array from the channeldata becomes detached
a workaround is to copy the channeldata before setting the buffer of the SourceNode
Expected results:
don't detach the ArrayBuffer
Reporter | ||
Comment 1•8 months ago
|
||
does not seem to be a regression, I tested the following versions of Firefox via https://hub.docker.com/r/jlesage/firefox
Firefox 101
Firefox 94
Firefox 74
Updated•7 months ago
|
Comment 2•7 months ago
•
|
||
Yes, the detach should occur only in one of these cases:
- When AudioBufferSourceNode.start is called, it acquires the contents of the node’s buffer. If the operation fails, nothing is played.
- When the buffer of an AudioBufferSourceNode is set and AudioBufferSourceNode.start has been previously called, the setter acquires the content of the AudioBuffer. If the operation fails, nothing is played.
This is the same issue as bug 1655336, but I'll keep this one open for now because the symptoms described are different.
Firefox's behavior has been this way since it was first implemented:
https://hg.mozilla.org/mozilla-central/rev/05cec405039374656a75bae5ff9019fd60510bee
Description
•