WPT
wpt / webaudio / the-audio-api / the-audiobuffer-interface / ctor-audiobuffer.html
Spec: Web Audio API ↗
Runs: Chrome 155.0.8041.0 (wpt@4a01b83e3, 2026-09-04) | Firefox 157.0a1 (wpt@e7122b73f, 2026-09-04) | Safari 251 preview (wpt@2c385f65e, 2026-09-04) | Ladybird 1.0-70fb3 (wpt@4a01b83e3, 2026-09-04) | Servo Servo 0.6 (wpt@7e3d005d7, 2026-09-03) | 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 | 62/62 | 62/62 | 62/62 | 62/62 | 62/62 | NOT RUN |
| Subtest | Chrome | Firefox | Safari | Ladybird | Servo | Blitz |
|---|---|---|---|---|---|---|
| # AUDIT TASK RUNNER STARTED. | PASS | PASS | PASS | PASS | PASS | — |
| Executing "initialize" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "invalid constructor" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "required options" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "invalid option values" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "default constructor" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "valid constructor" | PASS | PASS | PASS | PASS | PASS | — |
| Executing "multiple contexts" | PASS | PASS | PASS | PASS | PASS | — |
| Audit report | PASS | PASS | PASS | PASS | PASS | — |
| > [initialize] | PASS | PASS | PASS | PASS | PASS | — |
| context = new OfflineAudioContext(...) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| < [initialize] All assertions passed. (total 1 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [invalid constructor] | PASS | PASS | PASS | PASS | PASS | — |
| new AudioBuffer() threw TypeError: "Failed to construct 'AudioBuffer': 1 argument required, but only 0 present.". | PASS | — | — | — | — | — |
| new AudioBuffer(1) threw TypeError: "Failed to construct 'AudioBuffer': The provided value is not of type 'AudioBufferOptions'.". | PASS | — | — | — | — | — |
| new AudioBuffer(Date, 42) threw TypeError: "Failed to construct 'AudioBuffer': Failed to read the 'sampleRate' property from 'AudioBufferOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| < [invalid constructor] All assertions passed. (total 3 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [required options] | PASS | PASS | PASS | PASS | PASS | — |
| buffer = new AudioBuffer({}) threw TypeError: "Failed to construct 'AudioBuffer': Failed to read the 'length' property from 'AudioBufferOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| buffer = new AudioBuffer({length: 1}) threw TypeError: "Failed to construct 'AudioBuffer': Failed to read the 'sampleRate' property from 'AudioBufferOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| buffer = new AudioBuffer({sampleRate: 48000}) threw TypeError: "Failed to construct 'AudioBuffer': Failed to read the 'length' property from 'AudioBufferOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| buffer = new AudioBuffer({numberOfChannels: 1} threw TypeError: "Failed to construct 'AudioBuffer': Failed to read the 'length' property from 'AudioBufferOptions': Required member is undefined.". | PASS | — | — | — | — | — |
| buffer0 = new AudioBuffer({length: 21, sampleRate: 48000} did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer0.numberOfChannels is equal to 1. | PASS | PASS | PASS | PASS | PASS | — |
| buffer0.length is equal to 21. | PASS | PASS | PASS | PASS | PASS | — |
| buffer0.sampleRate is equal to 48000. | PASS | PASS | PASS | PASS | PASS | — |
| buffer1 = new AudioBuffer({numberOfChannels: 3, length: 1, sampleRate: 48000}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer1.numberOfChannels is equal to 3. | PASS | PASS | PASS | PASS | PASS | — |
| buffer1.length is equal to 1. | PASS | PASS | PASS | PASS | PASS | — |
| buffer1.sampleRate is equal to 48000. | PASS | PASS | PASS | PASS | PASS | — |
| < [required options] All assertions passed. (total 12 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [invalid option values] | PASS | PASS | PASS | PASS | PASS | — |
| new AudioBuffer({"numberOfChannels":0,"length":1,"sampleRate":16000}) threw NotSupportedError: "Failed to construct 'AudioBuffer': The number of channels provided (0) is outside the range [1, 32].". | PASS | — | — | — | — | — |
| new AudioBuffer({"numberOfChannels":99,"length":0,"sampleRate":16000}) threw NotSupportedError: "Failed to construct 'AudioBuffer': The number of channels provided (99) is outside the range [1, 32].". | PASS | — | — | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":0,"sampleRate":16000}) threw NotSupportedError: "Failed to construct 'AudioBuffer': The number of frames provided (0) is less than or equal to the minimum bound (0).". | PASS | — | — | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":1,"sampleRate":100}) threw NotSupportedError: "Failed to construct 'AudioBuffer': The sample rate provided (100) is outside the range [3000, 768000].". | PASS | — | — | — | — | — |
| < [invalid option values] All assertions passed. (total 4 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [default constructor] | PASS | PASS | PASS | PASS | PASS | — |
| buffer = new AudioBuffer({"numberOfChannels":5,"length":17,"sampleRate":16000}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.numberOfChannels is equal to 5. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.length is equal to 17. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.sampleRate is equal to 16000. | PASS | PASS | PASS | PASS | PASS | — |
| < [default constructor] All assertions passed. (total 4 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [valid constructor] | PASS | PASS | PASS | PASS | PASS | — |
| new AudioBuffer({"numberOfChannels":3,"length":42,"sampleRate":54321}) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.numberOfChannels is equal to 3. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.sampleRate is equal to 54321. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(0) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(0) length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(1) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(1) length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(2) did not throw an exception. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(2) length is equal to 42. | PASS | PASS | PASS | PASS | PASS | — |
| buffer.getChannelData(3) threw IndexSizeError: "Failed to execute 'getChannelData' on 'AudioBuffer': channel index (3) exceeds number of channels (3)". | PASS | — | — | — | — | — |
| < [valid constructor] All assertions passed. (total 11 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| > [multiple contexts] | PASS | PASS | PASS | PASS | PASS | — |
| c1 result is identical to the array [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16...]. | PASS | PASS | PASS | PASS | PASS | — |
| c2 result is identical to the array [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16...]. | PASS | PASS | PASS | PASS | PASS | — |
| AudioBuffer shared between two different contexts correctly | PASS | PASS | PASS | PASS | PASS | — |
| < [multiple contexts] All assertions passed. (total 3 assertions) | PASS | PASS | PASS | PASS | PASS | — |
| # AUDIT TASK RUNNER FINISHED: 7 tasks ran successfully. | PASS | PASS | PASS | PASS | PASS | — |
| new AudioBuffer() threw TypeError: "AudioBuffer constructor: At least 1 argument required, but only 0 passed". | — | PASS | — | — | — | — |
| new AudioBuffer(1) threw TypeError: "AudioBuffer constructor: Argument 1 can't be converted to a dictionary.". | — | PASS | — | — | — | — |
| new AudioBuffer(Date, 42) threw TypeError: "AudioBuffer constructor: Missing required 'sampleRate' member of AudioBufferOptions.". | — | PASS | — | — | — | — |
| buffer = new AudioBuffer({}) threw TypeError: "AudioBuffer constructor: Missing required 'length' member of AudioBufferOptions.". | — | PASS | — | — | — | — |
| buffer = new AudioBuffer({length: 1}) threw TypeError: "AudioBuffer constructor: Missing required 'sampleRate' member of AudioBufferOptions.". | — | PASS | — | — | — | — |
| buffer = new AudioBuffer({sampleRate: 48000}) threw TypeError: "AudioBuffer constructor: Missing required 'length' member of AudioBufferOptions.". | — | PASS | — | — | — | — |
| buffer = new AudioBuffer({numberOfChannels: 1} threw TypeError: "AudioBuffer constructor: Missing required 'length' member of AudioBufferOptions.". | — | PASS | — | — | — | — |
| new AudioBuffer({"numberOfChannels":0,"length":1,"sampleRate":16000}) threw NotSupportedError: "AudioBuffer constructor: Must have nonzero number of channels". | — | PASS | — | — | — | — |
| new AudioBuffer({"numberOfChannels":99,"length":0,"sampleRate":16000}) threw NotSupportedError: "AudioBuffer constructor: Number of channels (99) is out of range". | — | PASS | — | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":0,"sampleRate":16000}) threw NotSupportedError: "AudioBuffer constructor: Length (0) is out of range". | — | PASS | — | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":1,"sampleRate":100}) threw NotSupportedError: "AudioBuffer constructor: Sample rate (100) is out of range". | — | PASS | — | — | — | — |
| buffer.getChannelData(3) threw IndexSizeError: "AudioBuffer.getChannelData: Channel number (3) is out of range". | — | PASS | — | — | — | — |
| new AudioBuffer() threw TypeError: "Not enough arguments". | — | — | PASS | — | — | — |
| new AudioBuffer(1) threw TypeError: "Type error". | — | — | PASS | — | — | — |
| new AudioBuffer(Date, 42) threw TypeError: "Member AudioBufferOptions.sampleRate is required and must be an instance of float". | — | — | PASS | — | — | — |
| buffer = new AudioBuffer({}) threw TypeError: "Member AudioBufferOptions.length is required and must be an instance of unsigned long". | — | — | PASS | — | — | — |
| buffer = new AudioBuffer({length: 1}) threw TypeError: "Member AudioBufferOptions.sampleRate is required and must be an instance of float". | — | — | PASS | — | — | — |
| buffer = new AudioBuffer({sampleRate: 48000}) threw TypeError: "Member AudioBufferOptions.length is required and must be an instance of unsigned long". | — | — | PASS | — | — | — |
| buffer = new AudioBuffer({numberOfChannels: 1} threw TypeError: "Member AudioBufferOptions.length is required and must be an instance of unsigned long". | — | — | PASS | — | — | — |
| new AudioBuffer({"numberOfChannels":0,"length":1,"sampleRate":16000}) threw NotSupportedError: "Number of channels cannot be 0.". | — | — | PASS | — | — | — |
| new AudioBuffer({"numberOfChannels":99,"length":0,"sampleRate":16000}) threw NotSupportedError: "Number of channels cannot be more than max supported.". | — | — | PASS | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":0,"sampleRate":16000}) threw NotSupportedError: "Length must be at least 1.". | — | — | PASS | — | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":1,"sampleRate":100}) threw NotSupportedError: "Sample rate is not in the supported range.". | — | — | PASS | — | — | — |
| buffer.getChannelData(3) threw IndexSizeError: "Index must be less than number of channels.". | — | — | PASS | — | — | — |
| new AudioBuffer() threw TypeError: "Not enough arguments to "AudioBuffer.constructor".". | — | — | — | — | PASS | — |
| new AudioBuffer(1) threw TypeError: "Value is not an object.". | — | — | — | — | PASS | — |
| new AudioBuffer(Date, 42) threw TypeError: "Missing required member "sampleRate".". | — | — | — | — | PASS | — |
| buffer = new AudioBuffer({}) threw TypeError: "Missing required member "length".". | — | — | — | — | PASS | — |
| buffer = new AudioBuffer({length: 1}) threw TypeError: "Missing required member "sampleRate".". | — | — | — | — | PASS | — |
| buffer = new AudioBuffer({sampleRate: 48000}) threw TypeError: "Missing required member "length".". | — | — | — | — | PASS | — |
| buffer = new AudioBuffer({numberOfChannels: 1} threw TypeError: "Missing required member "length".". | — | — | — | — | PASS | — |
| new AudioBuffer({"numberOfChannels":0,"length":1,"sampleRate":16000}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new AudioBuffer({"numberOfChannels":99,"length":0,"sampleRate":16000}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new AudioBuffer({"numberOfChannels":1,"length":0,"sampleRate":16000}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| new AudioBuffer({"numberOfChannels":1,"length":1,"sampleRate":100}) threw NotSupportedError: "The operation is not supported.". | — | — | — | — | PASS | — |
| buffer.getChannelData(3) threw IndexSizeError: "The index is not in the allowed range.". | — | — | — | — | PASS | — |
| new AudioBuffer() threw TypeError: "AudioBuffer() needs one argument". | — | — | — | PASS | — | — |
| new AudioBuffer(1) threw TypeError: "Not an object of type AudioBufferOptions". | — | — | — | PASS | — | — |
| new AudioBuffer(Date, 42) threw TypeError: "Required property sampleRate is missing or undefined". | — | — | — | PASS | — | — |
| buffer = new AudioBuffer({}) threw TypeError: "Required property length is missing or undefined". | — | — | — | PASS | — | — |
| buffer = new AudioBuffer({length: 1}) threw TypeError: "Required property sampleRate is missing or undefined". | — | — | — | PASS | — | — |
| buffer = new AudioBuffer({sampleRate: 48000}) threw TypeError: "Required property length is missing or undefined". | — | — | — | PASS | — | — |
| buffer = new AudioBuffer({numberOfChannels: 1} threw TypeError: "Required property length is missing or undefined". | — | — | — | PASS | — | — |
| new AudioBuffer({"numberOfChannels":0,"length":1,"sampleRate":16000}) threw NotSupportedError: "Number of channels must not be '0'". | — | — | — | PASS | — | — |
| new AudioBuffer({"numberOfChannels":99,"length":0,"sampleRate":16000}) threw NotSupportedError: "Number of channels is greater than allowed range". | — | — | — | PASS | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":0,"sampleRate":16000}) threw NotSupportedError: "Length of buffer must be at least 1". | — | — | — | PASS | — | — |
| new AudioBuffer({"numberOfChannels":1,"length":1,"sampleRate":100}) threw NotSupportedError: "Sample rate is outside of allowed range". | — | — | — | PASS | — | — |
| buffer.getChannelData(3) threw IndexSizeError: "Channel index is out of range". | — | — | — | PASS | — | — |