Closed Bug 2059091 Opened 2 months ago Closed 2 months ago

Extended class from AudioBufferSourceNode does not play from own AudioBuffer

Categories

(Core :: Audio/Video, defect)

Firefox 140
defect

Tracking

()

RESOLVED DUPLICATE of bug 1655336

People

(Reporter: nowca, Unassigned)

Details

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

Steps to reproduce:

An extended class from AudioBufferSourceNode does not play the sound from the AudioBuffer, if the AudioBuffer-object is allocated directly to this.buffer in the Constructor.

It plays the sound, if another allocated AudioBuffer-object is referenced to this.buffer in the constructor.

Does not work:

class CustomNode extends AudioBufferSourceNode
{
    constructor(context, options)
    {
        super(context, options);

        this.buffer = context.createBuffer(this.channelCount, BUFFER_SIZE, context.sampleRate);
        this.generateBufferData(this.buffer);
    }
...
}

Does work:

class CustomNode extends AudioBufferSourceNode
{
    constructor(context, options)
    {
        super(context, options);

        var bufferAlloc = context.createBuffer(this.channelCount, BUFFER_SIZE, context.sampleRate);
        this.generateBufferData(bufferAlloc);
        this.buffer = bufferAlloc;
    }
...
}

Both with:

customAudioNode = new CustomNode(context);
customAudioNode.connect(context.destination);
...
customAudioNode.start();

It works on chrome and edge, but not in Firefox 140 (64 Bit) Linux.

Thank you for this nice browser all the years. I feel sad that so many browser extensions are not working anymore after the browser updates, because of the great work of so many people.

Actual results:

The method audioNode.start() does not play the sound (random noise) from customAudioNode.buffer.

Expected results:

It should play the sound, like in Chrome or Edge.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General
Component: General → Audio/Video
Product: Firefox → Core
Flags: needinfo?(karlt)

This is bug 1655336

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Duplicate of bug: 1655336
Flags: needinfo?(karlt)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.