Open Bug 1031851 Opened 11 years ago Updated 3 years ago

createScriptProcessor doesn't work with OfflineAudioContext

Categories

(Core :: Web Audio, defect, P4)

x86
macOS
defect

Tracking

()

Tracking Status
firefox66 --- affected

People

(Reporter: Dolske, Unassigned)

Details

Attachments

(1 file)

Attached file Testcase
Attached is a simplified testcase. When using and OfflineAudioContext with createScriptProcessor(), my script's onaudioprocess handler is correctly called and modifies an output buffer. But upon completion, the rendered buffer is empty (all samples are 0). If you modify the testcase to use a normal live AudioContext instead (look for "Uncomment this"), it generates the expected sound. Additionally, I created the OfflineAudioContext with a length of 15,000 samples, and createScriptProcessor() requests a buffer of 1024 samples. I'd expect onaudioprocess to be called 14 times with a 1024-sample buffer, and a 15th time with a 664-sample buffer (15000 - 1024*14 = 664). Instead it's only called 14 times.
This is workaround-able (because you're offline, so you might as well fill you buffer directly), but it's not great to have difference in rendering between OfflineAudioContext and AudioContext.
Priority: -- → P2
Rank: 25
Priority: P2 → P3
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4

Issue still present in 2019 (tested in Firefox 66.0.2).

In Firefox 68.0a1 the ScriptProcessorNode in OfflineAudioContext seems to be broken entirely.
It has some weird comportments (https://jsfiddle.net/Stepan_Kasyanenko/1ncbnt4f/).

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: