Click here to download the Blitz Browser!

WPT

wpt / webaudio / the-audio-api / the-audiocontext-interface / audiocontextoptions.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
Total41/4138/4137/4141/4137/41NOT RUN
SubtestChromeFirefoxSafariLadybirdServoBlitz
# AUDIT TASK RUNNER STARTED.PASSPASSPASSPASSPASS
Executing "test-audiocontextoptions-latencyHint-basic"PASSPASSPASSPASSPASS
Executing "test-audiocontextoptions-latencyHint-double"PASSPASSPASSPASSPASS
Executing "test-audiocontextoptions-sampleRate"PASSPASSPASSPASSPASS
Audit reportPASSPASSPASSPASSPASS
> [test-audiocontextoptions-latencyHint-basic] Test creating contexts with basic latencyHint types.PASSPASSPASSPASSPASS
context = new AudioContext() did not throw an exception.PASSPASSPASSPASSPASS
context.sampleRate (44100 Hz) is greater than 0.PASSPASSPASSPASS
default baseLatency is greater than or equal to 0.PASSPASSPASSPASSPASS
context = new AudioContext({'latencyHint': 'interactive'}) did not throw an exception.PASSPASSPASSPASSPASS
interactive baseLatency is equal to 0.01.PASS
context = new AudioContext({'latencyHint': 'balanced'}) did not throw an exception.PASSPASSPASSPASSPASS
balanced baseLatency is greater than or equal to 0.01.PASS
context = new AudioContext({'latencyHint': 'playback'}) did not throw an exception.PASSPASSPASSPASSPASS
playback baseLatency is greater than or equal to 0.01.PASS
< [test-audiocontextoptions-latencyHint-basic] All assertions passed. (total 9 assertions)PASSPASSPASSPASSPASS
> [test-audiocontextoptions-latencyHint-double] Test creating contexts with explicit latencyHint values.PASSPASSPASSPASSPASS
context = new AudioContext({'latencyHint': interactiveLatency/2}) did not throw an exception.PASSPASSPASSPASSPASS
double-constructor baseLatency small is less than or equal to 0.01.PASS
context = new AudioContext({'latencyHint': validLatency}) did not throw an exception.PASSPASSPASSPASSPASS
double-constructor baseLatency inrange 1 is greater than or equal to 0.01.PASS
double-constructor baseLatency inrange 2 is less than or equal to 0.023219954648526078.PASS
creating two high latency contexts did not throw an exception.PASSPASSPASSPASSPASS
high latency context baseLatency is equal to 0.18575963718820862.PASS
high latency context baseLatency is greater than or equal to 0.01.PASS
context = new AudioContext({'latencyHint': 'foo'}) threw TypeError: "Failed to construct 'AudioContext': Failed to read the 'latencyHint' property from 'AudioContextOptions': The provided value 'foo' is not a valid enum value of type AudioContextLatencyCategory.".PASS
context = new AudioContext('latencyHint') threw TypeError: "Failed to construct 'AudioContext': The provided value is not of type 'AudioContextOptions'.".PASS
< [test-audiocontextoptions-latencyHint-double] All assertions passed. (total 10 assertions)PASSPASSPASSPASS
> [test-audiocontextoptions-sampleRate] Test creating contexts with non-default sampleRate values.PASSPASSPASSPASSPASS
context = new AudioContext({sampleRate: -1}) threw NotSupportedError: "Failed to construct 'AudioContext': The hardware sample rate provided (-1) is outside the range [3000, 768000].".PASS
context = new AudioContext({sampleRate: 0}) threw NotSupportedError: "Failed to construct 'AudioContext': The hardware sample rate provided (0) is outside the range [3000, 768000].".PASS
context = new AudioContext({sampleRate: 2999}) threw NotSupportedError: "Failed to construct 'AudioContext': The hardware sample rate provided (2999) is outside the range [3000, 768000].".PASS
context = new AudioContext({sampleRate: 768001}) threw NotSupportedError: "Failed to construct 'AudioContext': The hardware sample rate provided (768001) is outside the range [3000, 768000].".PASS
context = new AudioContext({sampleRate: 3000}) did not throw an exception.PASSPASSPASSPASSPASS
sampleRate inrange is equal to 3000.PASSPASSPASSPASSPASS
context = new AudioContext({sampleRate: 768000}) did not throw an exception.PASSPASSPASSPASS
sampleRate inrange is equal to 768000.PASSPASSPASSPASS
context = new AudioContext({sampleRate: 24000}) did not throw an exception.PASSPASSPASSPASSPASS
sampleRate inrange is equal to 24000.PASSPASSPASSPASSPASS
< [test-audiocontextoptions-sampleRate] All assertions passed. (total 10 assertions)PASSPASSPASS
# AUDIT TASK RUNNER FINISHED: 3 tasks ran successfully.PASSPASS
interactive baseLatency is equal to 0.PASSPASSPASS
balanced baseLatency is greater than or equal to 0.PASSPASSPASS
playback baseLatency is greater than or equal to 0.PASSPASSPASS
double-constructor baseLatency small is less than or equal to 0.PASSPASSPASS
double-constructor baseLatency inrange 1 is greater than or equal to 0.PASSPASSPASS
double-constructor baseLatency inrange 2 is less than or equal to 0.PASSPASSPASS
high latency context baseLatency is equal to 0.PASSPASSPASS
high latency context baseLatency is greater than or equal to 0.PASSPASSPASS
X context = new AudioContext({'latencyHint': 'foo'}) did not throw an exception.FAIL
context = new AudioContext('latencyHint') threw TypeError: "AudioContext constructor: Argument 1 can't be converted to a dictionary.".PASS
< [test-audiocontextoptions-latencyHint-double] 1 out of 10 assertions were failed.FAIL
context = new AudioContext({sampleRate: -1}) threw NotSupportedError: "AudioContext constructor: Sample rate -1 is not in the range [3000, 768000]".PASS
context = new AudioContext({sampleRate: 0}) threw NotSupportedError: "AudioContext constructor: Sample rate 0 is not in the range [3000, 768000]".PASS
context = new AudioContext({sampleRate: 2999}) threw NotSupportedError: "AudioContext constructor: Sample rate 2999 is not in the range [3000, 768000]".PASS
context = new AudioContext({sampleRate: 768001}) threw NotSupportedError: "AudioContext constructor: Sample rate 768001 is not in the range [3000, 768000]".PASS
# AUDIT TASK RUNNER FINISHED: 1 out of 3 tasks were failed.FAILFAILFAIL
context.sampleRate (48000 Hz) is greater than 0.PASS
interactive baseLatency is equal to 0.0026666666666666666.PASS
balanced baseLatency is greater than or equal to 0.0026666666666666666.PASS
playback baseLatency is greater than or equal to 0.0026666666666666666.PASS
double-constructor baseLatency small is less than or equal to 0.0026666666666666666.PASS
double-constructor baseLatency inrange 1 is greater than or equal to 0.0026666666666666666.PASS
double-constructor baseLatency inrange 2 is less than or equal to 0.0026666666666666666.PASS
high latency context baseLatency is equal to 0.0026666666666666666.PASS
high latency context baseLatency is greater than or equal to 0.0026666666666666666.PASS
context = new AudioContext({'latencyHint': 'foo'}) threw TypeError: "Type error".PASS
context = new AudioContext('latencyHint') threw TypeError: "Type error".PASS
context = new AudioContext({sampleRate: -1}) threw NotSupportedError: "sampleRate is not in range".PASS
context = new AudioContext({sampleRate: 0}) threw NotSupportedError: "sampleRate is not in range".PASS
context = new AudioContext({sampleRate: 2999}) threw NotSupportedError: "sampleRate is not in range".PASS
context = new AudioContext({sampleRate: 768001}) threw NotSupportedError: "sampleRate is not in range".PASS
X context = new AudioContext({sampleRate: 768000}) incorrectly threw NotSupportedError: "sampleRate is not in range".FAIL
X sampleRate inrange is not equal to 768000. Got 3000.FAIL
< [test-audiocontextoptions-sampleRate] 2 out of 10 assertions were failed.FAILFAIL
context = new AudioContext({'latencyHint': 'foo'}) threw TypeError: "argument could not be converted to any of: ".PASS
context = new AudioContext('latencyHint') threw TypeError: "Value is not an object.".PASS
context = new AudioContext({sampleRate: -1}) threw NotSupportedError: "The operation is not supported.".PASS
context = new AudioContext({sampleRate: 0}) threw NotSupportedError: "The operation is not supported.".PASS
X context = new AudioContext({sampleRate: 2999}) did not throw an exception.FAIL
X context = new AudioContext({sampleRate: 768001}) did not throw an exception.FAIL
context = new AudioContext({'latencyHint': 'foo'}) threw TypeError: "Expected latencyHint to be a finite floating-point number".PASS
context = new AudioContext('latencyHint') threw TypeError: "Not an object of type AudioContextOptions".PASS
context = new AudioContext({sampleRate: -1}) threw NotSupportedError: "Sample rate is outside of allowed range".PASS
context = new AudioContext({sampleRate: 0}) threw NotSupportedError: "Sample rate is outside of allowed range".PASS
context = new AudioContext({sampleRate: 2999}) threw NotSupportedError: "Sample rate is outside of allowed range".PASS
context = new AudioContext({sampleRate: 768001}) threw NotSupportedError: "Sample rate is outside of allowed range".PASS