1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <script src="resources/audio-testing.js"></script>
5 <script src="resources/audioparam-testing.js"></script>
6 <script src="../fast/js/resources/js-test-pre.js"></script>
10 <div id="description"></div>
11 <div id="console"></div>
14 description("Test AudioParam setValueAtTime() functionality.");
16 // Play a long DC signal out through an AudioGainNode, and call setValueAtTime() at regular
17 // intervals to set the value for the duration of the interval. Each time interval has
18 // different value so that there is a discontinuity at each time interval boundary. The
19 // discontinuity is for testing timing.
21 // Number of tests to run.
22 var numberOfTests = 100;
24 // Max allowed difference between the rendered data and the expected result.
25 var maxAllowedError = 6e-8;
27 // Set the gain node value to the specified value at the specified time.
28 function setValue(value, time)
30 gainNode.gain.setValueAtTime(value, time);
33 // For testing setValueAtTime(), we don't need to do anything for automation. because the value at
34 // the beginning of the interval is set by setValue and it remains constant for the duration, which
36 function automation(value, startTime, endTime)
43 createAudioGraphAndTest(numberOfTests,
53 successfullyParsed = true;
57 <script src="../fast/js/resources/js-test-post.js"></script>