title: Android - Calculate deciBel from sound volume
body: <p>Is it possible to calculate the decibel value from the sound volume level?<br>
  Suppose a sound is playing, (it could be any track, but I'm using a generated sound with AudioTrack). While the sound is playing, the volume of the sound is increased from 0 (mute) to 99 (maximum).
  Now I want to retrieve the decibel value, when the volume level is 50, for example.<br>
  Is it possible?</p>
  
  <p>I found how to calculate decibel value in this thread: <a href="https://stackoverflow.com/questions/6571894/calculate-decibel-from-amplitude-android-media-recorder">Calculate Decibel from amplitude - Android media recorder</a>  </p>
  
  <pre><code>power_db = 20 * log10(amp / amp_ref);
  </code></pre>
  
  <p>but here it uses the amplitude, not sound volume.</p>