Algorithm for Wave Samples to Decibels - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Algorithm for Wave Samples to Decibels

Can anyone point me in the right direction? I'm trying to determine how

waveform samples translate into decibels. I've seen so many recorders

that display the decibel level and I need to know the formula that is used.

I have a solid understanding of wave file formats as I've written a wave file player and


Thanks in advance,

Christopher Hodges

Author of MIDI Station Sequencer for OS/2



  • Hi Christopher,

    Just wondering that there was no answer from sound programmers for such a simple question.

    (I am not prof).

    If you use unsigned integer for digital amplitude representation (for 16-bit sound) try to calculate it as following:

    dblev = 6*(float)log2((float)amplitude/65536);

    Now maybe someone could give me a glue how to get

    audio simultaneous playback capability using Win API?



Sign In or Register to comment.