| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="resources/compatibility.js"></script> | 4 <script src="resources/compatibility.js"></script> |
| 5 <script src="resources/audio-testing.js"></script> | 5 <script src="resources/audio-testing.js"></script> |
| 6 <script src="resources/audio-param.js"></script> | 6 <script src="resources/audio-param.js"></script> |
| 7 <script src="../resources/js-test.js"></script> | 7 <script src="../resources/js-test.js"></script> |
| 8 <title>Updating of Value Attribute from Timeline</title> | 8 <title>Updating of Value Attribute from Timeline</title> |
| 9 </head> | 9 </head> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Test the value attribute from a setTargetAtTime event | 55 // Test the value attribute from a setTargetAtTime event |
| 56 runTest(function (g, v0, t0, v1, t1) { | 56 runTest(function (g, v0, t0, v1, t1) { |
| 57 var timeConstant = 0.1; | 57 var timeConstant = 0.1; |
| 58 var vFinal = 0; | 58 var vFinal = 0; |
| 59 g.gain.setTargetAtTime(vFinal, t0, timeConstant); | 59 g.gain.setTargetAtTime(vFinal, t0, timeConstant); |
| 60 return { | 60 return { |
| 61 expectedValue: function (testTime) { | 61 expectedValue: function (testTime) { |
| 62 return audioParamSetTarget(testTime, v0, t0, vFinal, timeConstant)
; | 62 return audioParamSetTarget(testTime, v0, t0, vFinal, timeConstant)
; |
| 63 }, | 63 }, |
| 64 message: "setTargetAtTime(" + vFinal + ", " + t0 + ", " + timeConsta
nt + ")", | 64 message: "setTargetAtTime(" + vFinal + ", " + t0 + ", " + timeConsta
nt + ")", |
| 65 errorThreshold: 1.2869e-6 | 65 errorThreshold: 2.2599e-6 |
| 66 }; | 66 }; |
| 67 }).then(done); | 67 }).then(done); |
| 68 }); | 68 }); |
| 69 | 69 |
| 70 audit.defineTask("setValueCurve", function (done) { | 70 audit.defineTask("setValueCurve", function (done) { |
| 71 // Test the value attribute from a setValueCurve event | 71 // Test the value attribute from a setValueCurve event |
| 72 runTest(function (g, v0, t0, v1, t1) { | 72 runTest(function (g, v0, t0, v1, t1) { |
| 73 var curve = [1, 1.5, 4]; | 73 var curve = [1, 1.5, 4]; |
| 74 var duration = t1 - t0; | 74 var duration = t1 - t0; |
| 75 g.gain.setValueCurveAtTime(Float32Array.from(curve), t0, duration); | 75 g.gain.setValueCurveAtTime(Float32Array.from(curve), t0, duration); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 testPassed("Gain .value attribute correctly updated during automatio
n.\n"); | 163 testPassed("Gain .value attribute correctly updated during automatio
n.\n"); |
| 164 else | 164 else |
| 165 testFailed( | 165 testFailed( |
| 166 "Gain .value attribute not correctly updated during automation; ma
x error = " + | 166 "Gain .value attribute not correctly updated during automation; ma
x error = " + |
| 167 maxError + ".\n"); | 167 maxError + ".\n"); |
| 168 }); | 168 }); |
| 169 } | 169 } |
| 170 </script> | 170 </script> |
| 171 </body> | 171 </body> |
| 172 </html> | 172 </html> |
| OLD | NEW |