2

Is it possible to calculate the decibel value from the sound volume level?
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.
Is it possible?

I found how to calculate decibel value in this thread: Calculate Decibel from amplitude - Android media recorder

power_db = 20 * log10(amp / amp_ref);

but here it uses the amplitude, not sound volume.

Community
  • 1
  • 1
VCODE
  • 535
  • 5
  • 19

1 Answers1

0

For your calculations, you can probably assume that more amplitude = more volume.

They're very closely related: http://en.wikipedia.org/wiki/Volume_(sound)

theelfismike
  • 1,621
  • 12
  • 18
  • OK, I will try this. Then what will be `amp_ref` equal with, in this formula? – VCODE May 16 '12 at 05:46
  • You'll have to choose one - decibels are a relative measure of volume, not an absolute measure. Try 30dB as a baseline, and adjust as necessary. – theelfismike May 16 '12 at 16:06
  • I still don't get it... Lets assume: amp = 50, and amp_ref = 30 (as you pointed out). Then db=20*log10(amp/amp_ref), would be equal with = 0. This seems to look not correct. The main concern is that, the client wants to increase at every 2 seconds the intensity of tone with 10 decibels, starting from -10 till 100. By the way, is this possible to simulate? – VCODE May 19 '12 at 17:50