Regression in StereoPannerNode on M1 Macs
Categories
(Core :: Web Audio, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox105 | --- | verified |
People
(Reporter: chrisguttandin, Assigned: padenot)
Details
Attachments
(2 files)
Steps to reproduce:
I ran the following script:
const length = 5;
const sampleRate = 44100;
const buffer = new AudioBuffer({ length, numberOfChannels: 2, sampleRate });
buffer.copyToChannel(new Float32Array([1, 0.5, 0, -0.5, -1]), 0);
buffer.copyToChannel(new Float32Array([-0.5, -0.25, 0, 0.25, 0.5]), 1);
const offlineAudioContext = new OfflineAudioContext({ length, sampleRate });
const audioBufferSourceNode = new AudioBufferSourceNode(offlineAudioContext, { buffer });
const stereoPannerNode = new StereoPannerNode(offlineAudioContext, { channelCount: 2 });
audioBufferSourceNode.connect(stereoPannerNode).connect(offlineAudioContext.destination);
stereoPannerNode.pan.setValueAtTime(0.5, 0);
stereoPannerNode.pan.setValueAtTime(0, 2 / offlineAudioContext.sampleRate);
stereoPannerNode.pan.linearRampToValueAtTime(1, 5 / offlineAudioContext.sampleRate);
stereoPannerNode.pan.cancelScheduledValues(3 / offlineAudioContext.sampleRate);
audioBufferSourceNode.start(0);
offlineAudioContext.startRendering().then((renderedBuffer) => {
const channelData = renderedBuffer.getChannelData(0);
console.log(Array.from(channelData));
});
Actual results:
It logs [ 0.4571067690849304, 0.2285533845424652, 0, -0.125, -0.0732232928276062 ] when running it on an M1 Mac. The last number seems to be wrong.
Expected results:
It should log [ 0.4571067690849304, 0.2285533845424652, 0, -0.125, -0.25].
It does work on an older Intel Mac in Firefox v103. It also works in Chrome or Safari on any Apple processor architecture.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Comment 6•3 years ago
•
|
||
Reproduced the issue with Firefox 103.0.2 (20220808125904) on macOS 11 mac M1 mini. After loading the test case the console displayed the following results: Array(5) [ 0.4571067690849304, 0.2285533845424652, 0, -0.125, -0.0732232928276062 ]
The issue is verified fixed with Firefox 105.0b8 on macOS11 mac M1 mini. The console displays the correct results as stated in comment 0: Array(5) [ 0.4571067690849304, 0.2285533845424652, 0, -0.125, -0.25 ]
Description
•