| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 <script src="resources/compatibility.js"></script> |
| 5 <script type="text/javascript" src="resources/audio-testing.js"></script> | 6 <script type="text/javascript" src="resources/audio-testing.js"></script> |
| 6 </head> | 7 </head> |
| 7 | 8 |
| 8 <body> | 9 <body> |
| 9 <div id="description"></div> | 10 <div id="description"></div> |
| 10 <div id="console"></div> | 11 <div id="console"></div> |
| 11 | 12 |
| 12 <script> | 13 <script> |
| 13 description("Test pre-emphasis in DynamicsCompressor is removed"); | 14 description("Test pre-emphasis in DynamicsCompressor is removed"); |
| 14 var context; | 15 var context; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 47 } |
| 47 | 48 |
| 48 function runTest() { | 49 function runTest() { |
| 49 if (!window.testRunner) { | 50 if (!window.testRunner) { |
| 50 testRunner.dumpAsTest(); | 51 testRunner.dumpAsTest(); |
| 51 testRunner.waitUntilDone(); | 52 testRunner.waitUntilDone(); |
| 52 } | 53 } |
| 53 | 54 |
| 54 window.jsTestIsAsync = true; | 55 window.jsTestIsAsync = true; |
| 55 | 56 |
| 56 context = new webkitOfflineAudioContext(1, sampleRate * lengthInSeconds,
sampleRate); | 57 context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampl
eRate); |
| 57 // Connect an oscillator to a gain node to the compressor. The | 58 // Connect an oscillator to a gain node to the compressor. The |
| 58 // oscillator frequency is set to a high value for the (original) | 59 // oscillator frequency is set to a high value for the (original) |
| 59 // emphasis to kick in. The gain is a little extra boost to get the | 60 // emphasis to kick in. The gain is a little extra boost to get the |
| 60 // compressor enabled. | 61 // compressor enabled. |
| 61 // | 62 // |
| 62 var osc = context.createOscillator(); | 63 var osc = context.createOscillator(); |
| 63 osc.frequency.value = 15000; | 64 osc.frequency.value = 15000; |
| 64 var gain = context.createGain(); | 65 var gain = context.createGain(); |
| 65 gain.gain.value = 1.5; | 66 gain.gain.value = 1.5; |
| 66 var compressor = context.createDynamicsCompressor(); | 67 var compressor = context.createDynamicsCompressor(); |
| 67 osc.connect(gain); | 68 osc.connect(gain); |
| 68 gain.connect(compressor); | 69 gain.connect(compressor); |
| 69 compressor.connect(context.destination); | 70 compressor.connect(context.destination); |
| 70 osc.start(); | 71 osc.start(); |
| 71 context.oncomplete = checkResult; | 72 context.oncomplete = checkResult; |
| 72 context.startRendering(); | 73 context.startRendering(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 runTest(); | 76 runTest(); |
| 76 successfullyParsed = true; | 77 successfullyParsed = true; |
| 77 | 78 |
| 78 </script> | 79 </script> |
| 79 | 80 |
| 80 </body> | 81 </body> |
| 81 </html> | 82 </html> |
| OLD | NEW |