-4

I would like to ask if how to program a VOLUME LEVEL METER for STREAMING AUDIO. Using only the Laptop's stock Microphone i would like to know its sound level. Decibel(dB). Our project is to make a Volume Level Meter that would give us inputs for our true program which would get the decibels and would turn them into values.

Note:

Programming Knowledge: UNDERGRADUATE STUDENT Compiler Used: Microsoft Visual Studio 2010 Operating System: Windows 7 Professional x64bit / Ultimate x64Bit

Nitesh
  • 2,286
  • 2
  • 43
  • 65
mikepicart
  • 17
  • 1
  • 2
  • 6
    There is no question in your paragraph, just a work order. That is not the way things work here, mate. Please show us, that you have basic understanding of the work you are planning and don't expect others to implement a whole program for you. – Kai Mattern Jul 19 '12 at 22:08
  • 1
    what's this "our project"? Your project, maybe. – Reacher Gilt Jul 19 '12 at 22:10
  • Sorry guys... Just desperate for answers. :( – mikepicart Jul 25 '12 at 10:54

1 Answers1

3

I would take a look at DirectSound which can be used to capture waveforms. That will give you samples in (usually at least) 16 bit resolution (96Db dynamics). The biggest difference in max/min over these values over a certain period (say, 1/60th of a second) will be the volume of that frame. The 'scale' goes from -32768 (lowest amplitude) to 32767 (highest amplitude).

If you "draw" these values in a bar representing the volume every frame you would get the "bouncing volume bar" you're looking for.

The actual Decibels you're looking for can only be determined if you calibrate the max. volume to a known # Decibels. This is because of input gain, quality of the microphone and many other variables that, in the end, only tell the ("form of the") "waveform". The max/min amplitudes measured do not correspond to a specific Decibels value of (say) 50 or 120.

RobIII
  • 8,488
  • 2
  • 43
  • 93