Click here to download the Blitz Browser!

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

ChromeFirefoxSafariLadybirdServoBlitz
Total44/4444/4444/4444/4444/44NOT RUN
SubtestChromeFirefoxSafariLadybirdServoBlitz
# AUDIT TASK RUNNER STARTED.PASSPASSPASSPASSPASS
Executing "basic"PASSPASSPASSPASSPASS
Executing "options-1"PASSPASSPASSPASSPASS
Executing "options-2"PASSPASSPASSPASSPASS
Executing "options-3"PASSPASSPASSPASSPASS
Audit reportPASSPASSPASSPASSPASS
> [basic] Old-style constructorPASSPASSPASSPASSPASS
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.PASSPASSPASSPASSPASS
context.length is equal to 42.PASSPASSPASSPASSPASS
context.sampleRate is equal to 12345.PASSPASSPASSPASSPASS
context.destination.channelCount is equal to 3.PASSPASSPASSPASSPASS
context.destination.channelCountMode is equal to explicit.PASSPASSPASSPASSPASS
context.destination.channelInterpretation is equal to speakers.PASSPASSPASSPASSPASS
< [basic] All assertions passed. (total 8 assertions)PASSPASSPASSPASSPASS
> [options-1] Required optionsPASSPASSPASSPASSPASS
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.PASSPASSPASSPASSPASS
c2.destination.channelCount is equal to 1.PASSPASSPASSPASSPASS
c2.length is equal to 42.PASSPASSPASSPASSPASS
c2.sampleRate is equal to 12345.PASSPASSPASSPASSPASS
c2.destination.channelCountMode is equal to explicit.PASSPASSPASSPASSPASS
c2.destination.channelInterpretation is equal to speakers.PASSPASSPASSPASSPASS
< [options-1] All assertions passed. (total 10 assertions)PASSPASSPASSPASSPASS
> [options-2] Invalid optionsPASSPASSPASSPASSPASS
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)PASSPASSPASSPASSPASS
> [options-3] Valid optionsPASSPASSPASSPASSPASS
c = new OfflineAudioContext{"length":1,"sampleRate":8000}) did not throw an exception.PASSPASSPASSPASSPASS
c.length is equal to 1.PASSPASSPASSPASSPASS
c.sampleRate is equal to 8000.PASSPASSPASSPASSPASS
c.destination.channelCount is equal to 1.PASSPASSPASSPASSPASS
c.destination.channelCountMode is equal to explicit.PASSPASSPASSPASSPASS
c.destination.channelCountMode is equal to speakers.PASSPASSPASSPASSPASS
c = new OfflineAudioContext{"length":1,"sampleRate":8000,"numberOfChannels":7}) did not throw an exception.PASSPASSPASSPASSPASS
c.destination.channelCount is equal to 7.PASSPASSPASSPASSPASS
< [options-3] All assertions passed. (total 8 assertions)PASSPASSPASSPASSPASS
# AUDIT TASK RUNNER FINISHED: 4 tasks ran successfully.PASSPASSPASSPASSPASS
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