| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test ConstantSourceNode onended</title> | 4 <title>Test ConstantSourceNode onended</title> |
| 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/audio-testing.js"></script> | 8 <script src="resources/audio-testing.js"></script> |
| 8 </head> | 9 </head> |
| 9 | 10 |
| 10 <body> | 11 <body> |
| 11 <script> | 12 <script> |
| 12 var sampleRate = 44100.0; | 13 var sampleRate = 44100.0; |
| 13 // Number of frames that the source will run; fairly arbitrary | 14 // Number of frames that the source will run; fairly arbitrary |
| 14 var numberOfFrames = 32; | 15 var numberOfFrames = 32; |
| 15 // Number of frames to render; arbitrary, but should be larger than | 16 // Number of frames to render; arbitrary, but should be larger than |
| 16 // numberOfFrames; | 17 // numberOfFrames; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 src.start(); | 33 src.start(); |
| 33 src.stop(numberOfFrames / context.sampleRate); | 34 src.stop(numberOfFrames / context.sampleRate); |
| 34 | 35 |
| 35 context.startRendering(); | 36 context.startRendering(); |
| 36 | 37 |
| 37 </script> | 38 </script> |
| 38 </body> | 39 </body> |
| 39 </html> | 40 </html> |
| OLD | NEW |