| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <!-- | 3 <!-- |
| 4 Create an oscillator of type SAWTOOTH and generate a slow exponential tone sweep
. | 4 Create an oscillator of type SAWTOOTH and generate a slow exponential tone sweep
. |
| 5 The result can be checked for the correct wave shape and for aliasing artifacts. | 5 The result can be checked for the correct wave shape and for aliasing artifacts. |
| 6 See oscillator-testing.js for details. | 6 See oscillator-testing.js for details. |
| 7 --> | 7 --> |
| 8 | 8 |
| 9 <html> | 9 <html> |
| 10 <head> | 10 <head> |
| 11 <script type="text/javascript" src="resources/audio-testing.js"></script> | 11 <script type="text/javascript" src="resources/audio-testing.js"></script> |
| 12 <script type="text/javascript" src="resources/oscillator-testing.js"></script> | 12 <script type="text/javascript" src="resources/oscillator-testing.js"></script> |
| 13 </head> | 13 </head> |
| 14 <body> | 14 <body> |
| 15 | 15 |
| 16 <script> | 16 <script> |
| 17 | 17 |
| 18 window.onload = init; | 18 window.onload = init; |
| 19 | 19 |
| 20 function init() { | 20 function init() { |
| 21 if (!window.testRunner) | 21 if (!window.testRunner) |
| 22 return; | 22 return; |
| 23 | 23 |
| 24 generateExponentialOscillatorSweep(OSC.SAWTOOTH); | 24 // Create offline audio context. |
| 25 context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRat
e); |
| 26 generateExponentialOscillatorSweep(context, "sawtooth"); |
| 27 |
| 28 context.oncomplete = finishAudioTest; |
| 29 context.startRendering(); |
| 30 |
| 31 testRunner.waitUntilDone(); |
| 25 } | 32 } |
| 26 | 33 |
| 27 </script> | 34 </script> |
| 28 | 35 |
| 29 </body> | 36 </body> |
| 30 </html> | 37 </html> |
| OLD | NEW |