tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

panner-equalpower-stereo.html (1476B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>
      5      panner-equalpower-stereo.html
      6    </title>
      7    <script src="/resources/testharness.js"></script>
      8    <script src="/resources/testharnessreport.js"></script>
      9    <script src="../../resources/audit-util.js"></script>
     10    <script src="../../resources/audit.js"></script>
     11    <script src="../../resources/panner-model-testing.js"></script>
     12  </head>
     13  <body>
     14    <script id="layout-test-code">
     15      let audit = Audit.createTaskRunner();
     16 
     17      // To test the panner, we create a number of panner nodes
     18      // equally spaced on a semicircle at unit distance.  The
     19      // semicircle covers the azimuth range from -90 to 90 deg,
     20      // covering full left to full right.  Each source is an impulse
     21      // turning at a different time and we check that the rendered
     22      // impulse has the expected gain.
     23      audit.define(
     24          {
     25            label: 'test',
     26            description:
     27                'Equal-power panner model of AudioPannerNode with stereo source'
     28          },
     29          (task, should) => {
     30            context = new OfflineAudioContext(
     31                2, sampleRate * renderLengthSeconds, sampleRate);
     32 
     33            createTestAndRun(
     34                context, should, nodesToCreate, 2,
     35                function(panner, x, y, z) {
     36                  panner.setPosition(x, y, z);
     37                })
     38                .then(() => task.done());
     39          });
     40 
     41      audit.run();
     42    </script>
     43  </body>
     44 </html>