Monday, May 1, 2017

How to convert WAV to PCM format?

Wav files are often just raw PCM data with some RIFF and Wav header  information, depending on whether or not you know exactly whats in there will determine the method you use, stereo pcm data in cd quality sound is interleaved 16 bits per channel left first, often with wav files you can discard the first 44 bytes of the header and write the rest of the pcm data to your card to play or convert, but wav files can contain almost any kind of sound data, mu-law, pcm, adpcm, even mp3 wrapped in a wave file header. Another portable library is libao if you only want to open the file
for playing, very easy to use. but libsndfile does pretty much the same thing, also openal will give you a threaded write to your sound  device if you making a game of some kind.

references:
http://computer-programming-forum.com/47-c-language/7c98914c3e47bd5b.htm

No comments:

Post a Comment