test_bug1355798.html (960B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Test PannerNode produces output even when the even when the distance is 5 from the listener is zero, and the cone gain is present, regression test for 6 bug 1355798.</title> 7 <script src="/tests/SimpleTest/SimpleTest.js"></script> 8 <script type="text/javascript" src="webaudio.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <pre id="test"> 13 <script class="testbody" type="text/javascript"> 14 SimpleTest.waitForExplicitFinish(); 15 var off = new OfflineAudioContext(1, 128, 44100); 16 var panner = off.createPanner(); 17 var osc = off.createOscillator(); 18 panner.setPosition(1, 1, 1); 19 off.listener.setPosition(1, 1, 1); 20 osc.connect(panner).connect(off.destination); 21 panner.coneOuterAngle = 359; 22 osc.start(); 23 off.startRendering().then(function(b) { 24 is(b.getChannelData(0).filter(x => isNaN(x)).length, 0); 25 SimpleTest.finish(); 26 }); 27 </script> 28 </pre> 29 </body> 30 </html>