Click here to download the Blitz Browser!

WPT

wpt / webaudio / the-audio-api / the-periodicwave-interface / periodicWave.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

ChromeFirefoxSafariLadybirdServoBlitz
Total31/3131/3131/3131/3131/31NOT RUN
SubtestChromeFirefoxSafariLadybirdServoBlitz
# AUDIT TASK RUNNER STARTED.PASSPASSPASSPASSPASS
Executing "create with factory method"PASSPASSPASSPASSPASS
Executing "different length with factory method"PASSPASSPASSPASSPASS
Executing "too small with factory method"PASSPASSPASSPASSPASS
Executing "create with constructor"PASSPASSPASSPASSPASS
Executing "different length with constructor"PASSPASSPASSPASSPASS
Executing "too small with constructor"PASSPASSPASSPASSPASS
Executing "output test"PASSPASSPASSPASSPASS
Audit reportPASSPASSPASSPASSPASS
> [create with factory method] PASSPASSPASSPASSPASS
context.createPeriodicWave(new Float32Array(8192), new Float32Array(8192)) did not throw an exception.PASSPASSPASSPASSPASS
< [create with factory method] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [different length with factory method] PASSPASSPASSPASSPASS
context.createPeriodicWave(new Float32Array(512), new Float32Array(4)) threw IndexSizeError: "Failed to execute 'createPeriodicWave' on 'BaseAudioContext': length of real array (512) and length of imaginary array (4) must match.".PASS
< [different length with factory method] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [too small with factory method] PASSPASSPASSPASSPASS
context.createPeriodicWave(new Float32Array(1), new Float32Array(1)) threw IndexSizeError: "Failed to execute 'createPeriodicWave' on 'BaseAudioContext': The length of the real array provided (1) is less than the minimum bound (2).".PASS
< [too small with factory method] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [create with constructor] PASSPASSPASSPASSPASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(8192) }) did not throw an exception.PASSPASSPASSPASSPASS
< [create with constructor] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [different length with constructor] PASSPASSPASSPASSPASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw IndexSizeError: "Failed to construct 'PeriodicWave': length of real array (8192) and length of imaginary array (4) must match.".PASS
< [different length with constructor] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [too small with constructor] PASSPASSPASSPASSPASS
new PeriodicWave(context, { real : new Float32Array(1), imag : new Float32Array(1) }) threw IndexSizeError: "Failed to construct 'PeriodicWave': The length of the real array provided (1) is less than the minimum bound (2).".PASS
< [too small with constructor] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
> [output test] PASSPASSPASSPASSPASS
rendering PeriodicWave is identical to the array AudioBuffer.PASSPASSPASSPASSPASS
< [output test] All assertions passed. (total 1 assertions)PASSPASSPASSPASSPASS
# AUDIT TASK RUNNER FINISHED: 7 tasks ran successfully.PASSPASSPASSPASSPASS
context.createPeriodicWave(new Float32Array(512), new Float32Array(4)) threw IndexSizeError: "BaseAudioContext.createPeriodicWave: "real" and "imag" are different in length".PASS
context.createPeriodicWave(new Float32Array(1), new Float32Array(1)) threw IndexSizeError: "BaseAudioContext.createPeriodicWave: "real" and "imag" must have a length of at least 2".PASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw IndexSizeError: "PeriodicWave constructor: "real" and "imag" are different in length".PASS
new PeriodicWave(context, { real : new Float32Array(1), imag : new Float32Array(1) }) threw IndexSizeError: "PeriodicWave constructor: "real" and "imag" must have a length of at least 2".PASS
context.createPeriodicWave(new Float32Array(512), new Float32Array(4)) threw IndexSizeError: "real and imag have different lengths".PASS
context.createPeriodicWave(new Float32Array(1), new Float32Array(1)) threw IndexSizeError: "real's length cannot be less than 2".PASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw IndexSizeError: "real and imag have different lengths".PASS
new PeriodicWave(context, { real : new Float32Array(1), imag : new Float32Array(1) }) threw IndexSizeError: "real's length cannot be less than 2".PASS
context.createPeriodicWave(new Float32Array(512), new Float32Array(4)) threw IndexSizeError: "real and imag coefficients have different lengths".PASS
context.createPeriodicWave(new Float32Array(1), new Float32Array(1)) threw IndexSizeError: "At least one of real or imag coefficients have length less than 2".PASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw IndexSizeError: "real and imag coefficients have different lengths".PASS
new PeriodicWave(context, { real : new Float32Array(1), imag : new Float32Array(1) }) threw IndexSizeError: "At least one of real or imag coefficients have length less than 2".PASS
context.createPeriodicWave(new Float32Array(512), new Float32Array(4)) threw IndexSizeError: "Real and imaginary arrays must have the same length and contain at least 2 elements".PASS
context.createPeriodicWave(new Float32Array(1), new Float32Array(1)) threw IndexSizeError: "Real and imaginary arrays must have the same length and contain at least 2 elements".PASS
new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw IndexSizeError: "Real and imaginary arrays must have the same length and contain at least 2 elements".PASS
new PeriodicWave(context, { real : new Float32Array(1), imag : new Float32Array(1) }) threw IndexSizeError: "Real and imaginary arrays must have the same length and contain at least 2 elements".PASS