title: How to calibrate dbfs to db spl?
body: <p>I played a sound with web audio API and used a gainNode to change the volume. When I changed the gainNode's value, the Decibel meter showed a number not expected.</p>
  
  <pre><code>context.createGain();
  var source=context.createOscillator();
  source.frequency.value=1000;
  source.start();
  source.connect(gainNode);
  gainNode.connect(context.destination);
  
  gainNode.gain.value=Math.pow(10, dbfs/20));
  
  when dbfs=0,the Decibel meter showed 90 dbspl;
  when dbfs=-10,the Decibel meter showed 84 dbspl;
  when dbfs=-20,the Decibel meter showed 78 dbspl;
  when dbfs=-30,the Decibel meter showed 72 dbspl;
  when dbfs=-40,the Decibel meter showed 62 dbspl;
  when dbfs=-50,the Decibel meter showed 52 dbspl;
  </code></pre>
  
  <p>The actual volume was not changed as expected, was there any mistake in generating the gainNode's value? I want to play the sound at 80 db spl or other specific numbers,what can be the dbfs's value and how to make the gainNode's value?</p>