Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Measuring wav volume output?

Status
Not open for further replies.

FallNAngel

Programmer
Mar 4, 2002
5
PK
Like the subject says, I'm trying to measure the volume output of a wav file. Basically, I'm attempting to streamline a process by having the program I'm creating do the work a bit faster / reliable. Basically what would normally be done is a wav file would be opened in an editor and the wave form would be looked at for how often the volume hits a certain range. I would like the program I'm creating to scan the wav file and check for sound that hits this range. How would I go about getting started? Any help would be appreciated. Thanks!
 
Well, as i have understood it after having looked at WAV files they consists of a header and then the datas. The datas are in 16-bit size with the middle of something 0x7FFF or 0x8000. If it's stereo (defined in the header) the values is for left-right-left-right and so on, so set a upper and lower value as limit and check if the WAV file exceeds these.

Totte
 
Ahh, that gives me some direction I think. So read the header to find out how big it is, then read each 16 bit block and find out how loud the data is supposed to be for that block? Do you have any sites that go over the wav format off-hand (not asking for freebees, just asking if you have any that are particularly worth a look)? Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top