OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
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/js-test.js"></script> | 6 <script src="../resources/js-test.js"></script> |
7 <script src="resources/biquad-testing.js"></script> | 7 <script src="resources/biquad-testing.js"></script> |
8 </head> | 8 </head> |
9 | 9 |
10 <body> | 10 <body> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // conversion to a float produces 0. Any larger value would produce a non-z
ero value when | 253 // conversion to a float produces 0. Any larger value would produce a non-z
ero value when |
254 // converted to a single float. | 254 // converted to a single float. |
255 shouldThrow("node.gain.exponentialRampToValueAtTime(Math.pow(2, -150), 0.1)"
); | 255 shouldThrow("node.gain.exponentialRampToValueAtTime(Math.pow(2, -150), 0.1)"
); |
256 | 256 |
257 // Convolver buffer rate must match context rate. Create on offline context
so we | 257 // Convolver buffer rate must match context rate. Create on offline context
so we |
258 // specify the context rate exactly, in case the test is run on platforms wi
th different | 258 // specify the context rate exactly, in case the test is run on platforms wi
th different |
259 // HW sample rates. | 259 // HW sample rates. |
260 shouldNotThrow("oc = new OfflineAudioContext(1, 44100, 44100)"); | 260 shouldNotThrow("oc = new OfflineAudioContext(1, 44100, 44100)"); |
261 shouldNotThrow("conv = oc.createConvolver()"); | 261 shouldNotThrow("conv = oc.createConvolver()"); |
262 shouldThrow("conv.buffer = oc.createBuffer(1, 100, 22050)"); | 262 shouldThrow("conv.buffer = oc.createBuffer(1, 100, 22050)"); |
263 | 263 // conv.buffer should be unchanged (null) because the above failed. |
| 264 shouldBeNull("conv.buffer"); |
| 265 |
264 // PannerNode channel count and mode | 266 // PannerNode channel count and mode |
265 panner = context.createPanner(); | 267 panner = context.createPanner(); |
266 // Channel count can only be set to 1 or 2. | 268 // Channel count can only be set to 1 or 2. |
267 shouldNotThrow("panner.channelCount = 1"); | 269 shouldNotThrow("panner.channelCount = 1"); |
268 shouldNotThrow("panner.channelCount = 2"); | 270 shouldNotThrow("panner.channelCount = 2"); |
269 shouldThrowAndBeUnchanged("panner.channelCount", "0"); | 271 shouldThrowAndBeUnchanged("panner.channelCount", "0"); |
270 shouldThrowAndBeUnchanged("panner.channelCount", "3"); | 272 shouldThrowAndBeUnchanged("panner.channelCount", "3"); |
271 // It is illegal to set the mode to 'max' | 273 // It is illegal to set the mode to 'max' |
272 shouldThrowAndBeUnchanged("panner.channelCountMode", "'max'"); | 274 shouldThrowAndBeUnchanged("panner.channelCountMode", "'max'"); |
273 shouldNotThrow("panner.channelCountMode = 'explicit'"); | 275 shouldNotThrow("panner.channelCountMode = 'explicit'"); |
(...skipping 21 matching lines...) Expand all Loading... |
295 shouldBeUndefined("source.noteOn"); | 297 shouldBeUndefined("source.noteOn"); |
296 shouldBeUndefined("source.noteOff"); | 298 shouldBeUndefined("source.noteOff"); |
297 } | 299 } |
298 | 300 |
299 runTest(); | 301 runTest(); |
300 successfullyParsed = true; | 302 successfullyParsed = true; |
301 | 303 |
302 </script> | 304 </script> |
303 </body> | 305 </body> |
304 </html> | 306 </html> |
OLD | NEW |