Click here to Skip to main content
13,042,819 members (77,552 online)
Rate this:
Please Sign up or sign in to vote.
See more:
How do i calculate the dB level of an audio by using the microphone in the WindowsPhone.
any suggestion would be great.

thanks in advance
Posted 12-Mar-13 2:15am
Updated 15-Mar-13 2:58am
Jegan Thiyagesan 12-Mar-13 8:58am
What have you searched for?
What have you tried?
Where did you get stuck?
Sergey Alexandrovich Kryukov 12-Mar-13 11:43am
You should calculate it from scratch, using some fragment of a sample. First, calculate RMS in relative units.
For example, if you have 16-bit samples, recalculate each samples as double sample = bufferSample / System.Int16.MaximumValue...
Then read on the definition of dB and use it...

This is a relative measure, not reflecting physical noise level from the speaker (which always depends on number of factors). You can take maximum digital signal (such as System.Int16.MaximumValue) as a reference level...
deepaksharma0390 13-Mar-13 6:27am
@Sergey Alexandrovich Kryukov but how do i find the sound pressure value for calculating the RMS of the sound pressure.
Sergey Alexandrovich Kryukov 13-Mar-13 11:41am
You cannot. Sound pressure depends on may factors you don't control (hardware, even the room). You can only deal with relative levels, isn't that obvious?
deepaksharma0390 13-Mar-13 11:57am
then how can i calculate the RMS sound pressure...
Sergey Alexandrovich Kryukov 13-Mar-13 13:36pm
I just answered... you have nothing to measure absolute physical pressure. Isn't it obvious?
Nelek 15-Mar-13 9:12am
You should do the job and give a ready-to-go answer... isn't it obvious? ;P
Sergey Alexandrovich Kryukov 15-Mar-13 10:07am
Interesting idea, thank you. :-)
joshrduncan2012 15-Mar-13 9:12am
Are you wanting someone to write the code for you?
deepaksharma0390 21-Mar-13 7:34am
i did not ask anyone to write the code for me..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 15 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100