blob: a4c712f4de8064ace6c5cf38ff5db4b6ea9994c3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test.js"></script>
<script src="resources/audio-testing.js"></script>
<script src="resources/delay-testing.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description("Tests DelayNode with delay set to default maximum delay.");
function runTest() {
window.jsTestIsAsync = true;
// Create offline audio context.
var context = new webkitOfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate);
var toneBuffer = createToneBuffer(context, 20, 20 * toneLengthSeconds, sampleRate); // 20Hz tone
var bufferSource = context.createBufferSource();
bufferSource.buffer = toneBuffer;
var delay = context.createDelay();
delayTimeSeconds = 1;
delay.delayTime.value = delayTimeSeconds;
bufferSource.connect(delay);
delay.connect(context.destination);
bufferSource.start(0);
context.oncomplete = checkDelayedResult(toneBuffer);
context.startRendering();
}
runTest();
</script>
</body>
</html>