blob: 245a2e10918c2868906e07dea8a147f15c365f07 [file] [log] [blame] [edit]
<!DOCTYPE html>
<html>
<script src="../resources/js-test.js"></script>
<body>
<script>
description("Tests that we do not crash when using a very large sample rate");
jsTestIsAsync = true;
context = new AudioContext({ sampleRate: 384000 });
shouldBe("context.sampleRate", "384000");
context.addEventListener("statechange", () => {
shouldBeEqualToString("context.state", "running");
finishJSTest();
}, {once: true});
node = new ConstantSourceNode(context, { offset: 0.5 });
node.connect(context.destination);
node.start();
</script>
</body>
</html>