23 lines
514 B
HTML
23 lines
514 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<script src="../resources/js-test.js"></script>
|
|
<body>
|
|
<script>
|
|
description("Tests that we do not crash when using a very low sample rate");
|
|
jsTestIsAsync = true;
|
|
|
|
context = new AudioContext({ sampleRate: 3000 });
|
|
shouldBe("context.sampleRate", "3000");
|
|
|
|
node = new ConstantSourceNode(context, { offset: 0.5 });
|
|
node.connect(context.destination);
|
|
node.start();
|
|
|
|
setTimeout(() => {
|
|
shouldBeEqualToString("context.state", "running");
|
|
finishJSTest();
|
|
}, 100);
|
|
</script>
|
|
</body>
|
|
</html>
|