docs: function startBenchmark() {
    let audioContext =
      new OfflineAudioContext(numberOutputChannels,
        durationSeconds * sampleRate, sampleRate);
    if (typeof webkitOfflineAudioContext !== 'undefined') {
      playback.textContent = 'Begin';
      playback.disabled = false;
      let statusBar = document.getElementById('statusBar');
      statusBar.innerHTML = 'Benchmarks are unsupported on Safari/iOS.';
      statusBar.hidden = false;
      let progressBar = document.getElementById('progressBar');
      progressBar.hidden = true;
      return;
    }
  
    let audioElement = document.createElement('audio');
    audioElement.src = 'resources/cube-sound.wav';
    audioElement.crossOrigin = 'anonymous';
    audioElement.load();
    audioElement.loop = true;
    let audioElementSource = audioContext.createMediaElementSource(audioElement);
  
    let numberSources =
      Number(document.getElementById('numberSourcesNumber').value);
    if (numberSources < 1) {
      playback.textContent = 'Begin';
      playback.disabled = false;
      return;
    }
  
    let renderingMode = document.getElementById('renderingModeSelect');
    let order = -1;
    switch (renderingMode.value) {
      case 'foa':
      {
        order = 1;
      }
      break;
      case 'soa':
      {
        order = 2;
      }
      break;
      case 'toa':
      {
        order = 3;
      }
      break;
    }
  
    let sources = [];
    if (order > -1) {
      let options = selectDimensionsAndMaterials();
      let scene = new ResonanceAudio(audioContext, {
        ambisonicOrder: order,
        dimensions: options.dimensions,
        materials: options.materials,
      });
      for (let i = 0; i < numberSources; i++) {
        sources[i] = scene.createSource();
        audioElementSource.connect(sources[i].input);
      }
      scene.output.connect(audioContext.destination);
    } else {
      for (let i = 0; i < numberSources; i++) {
        sources[i] = audioContext.createPanner();
        sources[i].panningModel = 'HRTF';
        sources[i].distanceModel = 'inverse';
        sources[i].refDistance = 0.1;
        sources[i].maxDistance = 1000;
        audioElementSource.connect(sources[i]);
        sources[i].connect(audioContext.destination);
      }
    }
  
    for (let i = 0; i < numberSources; i++) {
      let theta = Math.random() * Math.PI * 2;
      let phi = Math.acos(Math.random() * 2 - 1);
      let x = Math.cos(theta) * Math.sin(phi);
      let y = Math.cos(phi);
      let z = Math.sin(theta) * Math.sin(phi);
      sources[i].setPosition(x, y, z);
    }
  
    audioElement.currentTime = 0;
    audioElement.play();
  
    window.setTimeout(function() {
      let startTime = Date.now();
      audioContext.startRendering().then(function(renderedBuffer) {
        playback.textContent = 'Begin';
        playback.disabled = false;
        let currentTime = (Date.now() - startTime) / 1000;
        let statusBar = document.getElementById('statusBar');
        statusBar.innerHTML = 'Elapsed Time: ' + currentTime + ' seconds.';
        statusBar.hidden = false;
        let progressBar = document.getElementById('progressBar');
        progressBar.hidden = true;
      }).catch(function(error) {
        console.log(error);
      });
    }, 100);
  }