DSPRelated.com
Forums

Extracting RAW PCM data from .wave file

Started by rahu...@spectross.com August 29, 2008
Hi all,
I want to extract Raw PCM data from .wav file, I have gone through RIFF format for .wave files

RIFF( 'WAVE'
// Format
[] // Fact chunk
[] // Cue points
[] // Playlist
[] //Associated data list
) // Wave data

i am not getting information about how to decide whether optional field ( in [ ]) are being used or not? or they are not for .wave ?
also can any one have link/code for extracting Raw PCM from .WAVE format?

Thanks in Advance,
Rahul.
On Fri, Aug 29, 2008 at 05:12:19AM -0400, r...@spectross.com wrote:
> Hi all,
> I want to extract Raw PCM data from .wav file, I have gone through RIFF format for .wave files
>
> RIFF( 'WAVE'
> // Format
> [] // Fact chunk
> [] // Cue points
> [] // Playlist
> [] //Associated data list
> ) // Wave data
>
> i am not getting information about how to decide whether optional field (
> in [ ]) are being used or not? or they are not for .wave ? also can any
> one have link/code for extracting Raw PCM from .WAVE format?

If you just chop off the first 44 bytes, you'll have raw PCM data in
whatever format you choose to save it in. I tend to use 16 bit stereo so
it's left-lsb, left-msb, right-lsb, right-msb until the end of the file.
I've never seen anything use a header other than 44 bytes so you may come
unstuck doing it this way but it's never caused me an issue.

Chris
--
Chris Eilbeck