OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 <script src="../resources/audit-util.js"></script> | 7 <script src="../resources/audit-util.js"></script> |
8 <script src="../resources/audit.js"></script> | 8 <script src="../resources/audit.js"></script> |
9 </head> | 9 </head> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 let n = audioBuffer.length; | 22 let n = audioBuffer.length; |
23 let data = audioBuffer.getChannelData(0); | 23 let data = audioBuffer.getChannelData(0); |
24 | 24 |
25 for (let i = 0; i < n; ++i) { | 25 for (let i = 0; i < n; ++i) { |
26 data[i] = Math.sin(frequency * 2 * Math.PI * i / sampleRate); | 26 data[i] = Math.sin(frequency * 2 * Math.PI * i / sampleRate); |
27 } | 27 } |
28 | 28 |
29 return audioBuffer; | 29 return audioBuffer; |
30 } | 30 } |
31 | 31 |
32 audit.define('Test connections', function(task, should) { | 32 audit.define({ |
33 task.describe('AudioNode connection order doesn\'t trigger assertion errors'); | 33 label: 'Test connections', |
| 34 description: 'AudioNode connection order doesn\'t trigger assertion errors' |
| 35 }, function(task, should) { |
34 // Create offline audio context. | 36 // Create offline audio context. |
35 let context = | 37 let context = |
36 new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); | 38 new OfflineAudioContext(1, sampleRate * renderLengthSeconds, sampleRate); |
37 let toneBuffer = createSinWaveBuffer(context, renderLengthSeconds, 880); | 39 let toneBuffer = createSinWaveBuffer(context, renderLengthSeconds, 880); |
38 | 40 |
39 let bufferSource = context.createBufferSource(); | 41 let bufferSource = context.createBufferSource(); |
40 bufferSource.buffer = toneBuffer; | 42 bufferSource.buffer = toneBuffer; |
41 bufferSource.connect(context.destination); | 43 bufferSource.connect(context.destination); |
42 | 44 |
43 let delay = context.createDelay(); | 45 let delay = context.createDelay(); |
(...skipping 19 matching lines...) Expand all Loading... |
63 .beResolved() | 65 .beResolved() |
64 .then(task.done.bind(task)); | 66 .then(task.done.bind(task)); |
65 }); | 67 }); |
66 | 68 |
67 audit.run(); | 69 audit.run(); |
68 | 70 |
69 </script> | 71 </script> |
70 | 72 |
71 </body> | 73 </body> |
72 </html> | 74 </html> |
OLD | NEW |