Open Bug 1796782 Opened 1 year ago Updated 1 year ago

Setting AudioBufferSourceNode's buffer detaches channelData Float32Array


(Core :: Web Audio, defect)

Firefox 105




(Reporter: bartel.wilhelm, Unassigned)


(Depends on 1 open bug)


User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

see code and demo:

  1. extract channelData from an existing AudioBuffer x
  2. 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

does not seem to be a regression, I tested the following versions of Firefox via

Firefox 101
Firefox 94
Firefox 74

Component: Untriaged → Web Audio
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

Yes, the detach should occur only in one of these cases:

  1. When AudioBufferSourceNode.start is called, it acquires the contents of the node’s buffer. If the operation fails, nothing is played.
  2. 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:

Blocks: 864164
Severity: -- → S3
Depends on: 1655336
Ever confirmed: true
OS: Linux → All
You need to log in before you can comment on or make changes to this bug.