WPT
wpt / webaudio / the-audio-api / the-offlineaudiocontext-interface / ctor-offlineaudiocontext.html
Spec: Web Audio API ↗
Runs: Chrome 155.0.8043.0 (wpt@b89af32bc, 2026-09-05) | Firefox 157.0a1 (wpt@b89af32bc, 2026-09-05) | Safari 251 preview (wpt@9b965429d, 2026-09-05) | Ladybird 1.0-d25dc (wpt@b89af32bc, 2026-09-05) | Servo Servo 0.6 (wpt@2c385f65e, 2026-09-04) | Blitz a50cb8971 (wpt@a95401e4e, 2026-09-03)
View on the Blitz WPT dashboard | Open test on wpt.live | wpt.fyi
| Chrome | Firefox | Safari | Ladybird | Servo | Blitz | |
|---|---|---|---|---|---|---|
| Total | 44/44 | 44/44 | 44/44 | 44/44 | 44/44 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| # AUDIT TASK RUNNER STARTED. | PASS | PASS | PASS | PASS | PASS | — |
| Executing "basic" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "options-1" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "options-2" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "options-3" | PASS | PASS | PASS | PASS | PASS | — |
| Audit report | PASS | PASS | PASS | PASS | PASS | — |
| > [basic] Old-style constructor | PASS | PASS | PASS | PASS | PASS | — |
| new OfflineAudioContext(3) threw TypeError: "Failed to construct 'OfflineAudioContext': The provided value is not of type 'OfflineAudioContextOptions'.". | PASS | — | — | — | — | — |
| new OfflineAudioContext(3, 42) threw TypeError: "Failed to construct 'OfflineAudioContext': Overload resolution failed.". | PASS | — | — | — | — | — |
| context = new OfflineAudioContext(3, 42, 12345) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| context.length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| context.sampleRate is equal to 12345. | PASS | PASS | PASS | PASS | PASS | — |
| context.destination.channelCount is equal to 3. | PASS | PASS | PASS | PASS | PASS | — |
| context.destination.channelCountMode is equal to explicit. | PASS | PASS | PASS | PASS | PASS | — |
| context.destination.channelInterpretation is equal to speakers. | PASS | PASS | PASS | PASS | PASS | — |
| < [basic] All assertions passed. (total 8 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [options-1] Required options | PASS | PASS | PASS | PASS | PASS | — |
| new OfflineAudioContext() threw TypeError: "Failed to construct 'OfflineAudioContext': 1 argument required, but only 0 present.". | PASS | — | — | — | — | — |
| new OfflineAudioContext({}) threw TypeError: "Failed to construct 'OfflineAudioContext': Failed to read the 'length' property from 'OfflineAudioContextOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| new OfflineAudioContext({"length":42}) threw TypeError: "Failed to construct 'OfflineAudioContext': Failed to read the 'sampleRate' property from 'OfflineAudioContextOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| new OfflineAudioContext({"sampleRate":12345}) threw TypeError: "Failed to construct 'OfflineAudioContext': Failed to read the 'length' property from 'OfflineAudioContextOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| c2 = new OfflineAudioContext({"length":42,"sampleRate":12345}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| c2.destination.channelCount is equal to 1. | PASS | PASS | PASS | PASS | PASS | — |
| c2.length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| c2.sampleRate is equal to 12345. | PASS | PASS | PASS | PASS | PASS | — |
| c2.destination.channelCountMode is equal to explicit. | PASS | PASS | PASS | PASS | PASS | — |
| c2.destination.channelInterpretation is equal to speakers. | PASS | PASS | PASS | PASS | PASS | — |
| < [options-1] All assertions passed. (total 10 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [options-2] Invalid options | PASS | PASS | PASS | PASS | PASS | — |
| new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) threw NotSupportedError: "Failed to construct 'OfflineAudioContext': The number of channels provided (33) is outside the range [1, 32].". | PASS | — | — | — | — | — |
| new OfflineAudioContext({"length":0,"sampleRate":8000}) threw NotSupportedError: "Failed to construct 'OfflineAudioContext': The number of frames provided (0) is less than the minimum bound (1).". | PASS | — | — | — | — | — |
| new OfflineAudioContext({"length":1,"sampleRate":1}) threw NotSupportedError: "Failed to construct 'OfflineAudioContext': The sampleRate provided (1) is outside the range [3000, 768000].". | PASS | — | — | — | — | — |
| < [options-2] All assertions passed. (total 3 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [options-3] Valid options | PASS | PASS | PASS | PASS | PASS | — |
| c = new OfflineAudioContext{"length":1,"sampleRate":8000}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| c.length is equal to 1. | PASS | PASS | PASS | PASS | PASS | — |
| c.sampleRate is equal to 8000. | PASS | PASS | PASS | PASS | PASS | — |
| c.destination.channelCount is equal to 1. | PASS | PASS | PASS | PASS | PASS | — |
| c.destination.channelCountMode is equal to explicit. | PASS | PASS | PASS | PASS | PASS | — |
| c.destination.channelCountMode is equal to speakers. | PASS | PASS | PASS | PASS | PASS | — |
| c = new OfflineAudioContext{"length":1,"sampleRate":8000,"numberOfChannels":7}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| c.destination.channelCount is equal to 7. | PASS | PASS | PASS | PASS | PASS | — |
| < [options-3] All assertions passed. (total 8 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| # AUDIT TASK RUNNER FINISHED: 4 tasks ran successfully. | PASS | PASS | PASS | PASS | PASS | — |
| new OfflineAudioContext(3) threw TypeError: "OfflineAudioContext constructor: Argument 1 can't be converted to a dictionary.". | — | PASS | — | — | — | — |
| new OfflineAudioContext(3, 42) threw TypeError: "OfflineAudioContext constructor: 2 is not a valid argument count for any overload.". | — | PASS | — | — | — | — |
| new OfflineAudioContext() threw TypeError: "OfflineAudioContext constructor: 0 is not a valid argument count for any overload.". | — | PASS | — | — | — | — |
| new OfflineAudioContext({}) threw TypeError: "OfflineAudioContext constructor: Missing required 'length' member of OfflineAudioContextOptions.". | — | PASS | — | — | — | — |
| new OfflineAudioContext({"length":42}) threw TypeError: "OfflineAudioContext constructor: Missing required 'sampleRate' member of OfflineAudioContextOptions.". | — | PASS | — | — | — | — |
| new OfflineAudioContext({"sampleRate":12345}) threw TypeError: "OfflineAudioContext constructor: Missing required 'length' member of OfflineAudioContextOptions.". | — | PASS | — | — | — | — |
| new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) threw NotSupportedError: "OfflineAudioContext constructor: 33 is not a valid channel count". | — | PASS | — | — | — | — |
| new OfflineAudioContext({"length":0,"sampleRate":8000}) threw NotSupportedError: "OfflineAudioContext constructor: Length must be nonzero". | — | PASS | — | — | — | — |
| new OfflineAudioContext({"length":1,"sampleRate":1}) threw NotSupportedError: "OfflineAudioContext constructor: Sample rate 1 is not in the range [3000, 768000]". | — | PASS | — | — | — | — |
| new OfflineAudioContext(3) threw TypeError: "Type error". | — | — | PASS | — | — | — |
| new OfflineAudioContext(3, 42) threw TypeError: "Type error". | — | — | PASS | — | — | — |
| new OfflineAudioContext() threw TypeError: "Not enough arguments". | — | — | PASS | — | — | — |
| new OfflineAudioContext({}) threw TypeError: "Member OfflineAudioContextOptions.length is required and must be an instance of unsigned long". | — | — | PASS | — | — | — |
| new OfflineAudioContext({"length":42}) threw TypeError: "Member OfflineAudioContextOptions.sampleRate is required and must be an instance of float". | — | — | PASS | — | — | — |
| new OfflineAudioContext({"sampleRate":12345}) threw TypeError: "Member OfflineAudioContextOptions.length is required and must be an instance of unsigned long". | — | — | PASS | — | — | — |
| new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) threw NotSupportedError: "Number of channels is not in range". | — | — | PASS | — | — | — |
| new OfflineAudioContext({"length":0,"sampleRate":8000}) threw NotSupportedError: "length cannot be 0". | — | — | PASS | — | — | — |
| new OfflineAudioContext({"length":1,"sampleRate":1}) threw NotSupportedError: "sampleRate is not in range". | — | — | PASS | — | — | — |
| new OfflineAudioContext(3) threw TypeError: "Value is not an object.". | — | — | — | — | PASS | — |
| new OfflineAudioContext(3, 42) threw TypeError: "Not enough arguments to "OfflineAudioContext.constructor".". | — | — | — | — | PASS | — |
| new OfflineAudioContext() threw TypeError: "Not enough arguments to "OfflineAudioContext.constructor".". | — | — | — | — | PASS | — |
| new OfflineAudioContext({}) threw TypeError: "Missing required member "length".". | — | — | — | — | PASS | — |
| new OfflineAudioContext({"length":42}) threw TypeError: "Missing required member "sampleRate".". | — | — | — | — | PASS | — |
| new OfflineAudioContext({"sampleRate":12345}) threw TypeError: "Missing required member "length".". | — | — | — | — | PASS | — |
| new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new OfflineAudioContext({"length":0,"sampleRate":8000}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new OfflineAudioContext({"length":1,"sampleRate":1}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new OfflineAudioContext(3) threw TypeError: "Not an object of type OfflineAudioContextOptions". | — | — | — | PASS | — | — |
| new OfflineAudioContext(3, 42) threw TypeError: "Overload resolution failed". | — | — | — | PASS | — | — |
| new OfflineAudioContext() threw TypeError: "Overload resolution failed". | — | — | — | PASS | — | — |
| new OfflineAudioContext({}) threw TypeError: "Required property length is missing or undefined". | — | — | — | PASS | — | — |
| new OfflineAudioContext({"length":42}) threw TypeError: "Required property sampleRate is missing or undefined". | — | — | — | PASS | — | — |
| new OfflineAudioContext({"sampleRate":12345}) threw TypeError: "Required property length is missing or undefined". | — | — | — | PASS | — | — |
| new OfflineAudioContext({"length":42,"sampleRate":8000,"numberOfChannels":33}) threw NotSupportedError: "Number of channels is greater than allowed range". | — | — | — | PASS | — | — |
| new OfflineAudioContext({"length":0,"sampleRate":8000}) threw NotSupportedError: "Length of buffer must be at least 1". | — | — | — | PASS | — | — |
| new OfflineAudioContext({"length":1,"sampleRate":1}) threw NotSupportedError: "Sample rate is outside of allowed range". | — | — | — | PASS | — | — |