Re: Extracting Raw PCM data from .wav file



rajesh wrote:
On Aug 29, 3:06 pm, "jadhav_rahul" <rahul.jad...@xxxxxxxxxxxxx> wrote:
Hi all,
I want to extract Raw PCM data from .wav file, I have gone through
RIFF format for .wave files

RIFF( 'WAVE'
<fmt-ck> // Format
[<fact-ck>] // Fact chunk
[<cue-ck>] // Cue points
[<playlist-ck>] // Playlist
[<assoc-data-list>] //Associated data list
<wave-data> ) // 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.

http://www.thisisnotalabel.com/How-to-Read-and-Write-WAV-Files---in-C-and-VB.php

These days, one must ~expect~ other chunks to appear between <fmt > and <data> - including all or any of the above. You can even legally have chunks between the opening RIFF<WAVE> and <fmt >, though I can't remember the last time I found that in a file. So that site (like so many, sadly) is giving a wrong idea of how the format works. The solution however, is easy - just ignore (skip over) any chunks you don't know about or don't need.

Or, even more simply - use libsndfile!

Richard Dobson
.



Relevant Pages

  • Question about wave module
    ... I've been playing with the 'wave' and 'audioop' modules in the library, ... When I tried to read a "wav" file with samples ... that only 16-bit format is supported. ... Windows Media Player. ...
    (comp.lang.python)
  • Re: NEEDed: well formed stereo .wav file
    ... No, I referred to the smallest possible legal WAVE header, where the audio samples start at byte 44. ... WAVE is a chunked format, and there is a smallest legal header, and many possible larger possible headers. ...
    (comp.dsp)
  • Re: Display wma files as Wave formats
    ... It's still not super-clear what you are seeing in your head when you write "displayed in wave format". ... That means if i select a audio file(*.wma), i would like to display the wma file data in wave format. ...
    (microsoft.public.windowsmedia.player)
  • Re: Shiny new portable recorder.
    ... including a lot of undocumented MS compression ... > propietary wave compressions. ... > year old Apple-II floppy in some strange format can be difficult. ... > archiving avoid binding to specific media and to propietary formats. ...
    (rec.audio.pro)
  • Re: Clarification on most universal wave playing/recording format for modems and telephony devices
    ... This is one of the many idiosyncrasies of Dialogic cards as well as ... The standard format most devices use as was stated is PCM ... Do not use the Dialogic "VOX" format as they are wave ... "TAPI tools for telephony programmers" ...
    (microsoft.public.win32.programmer.tapi)