This project has moved. For the latest updates, please go here.

HeaderLess Wave chunks

May 14, 2011 at 9:01 AM

Dear All,

Is there any way we can plan a "Header less" wave file using NAudio. If so kindly link me to the sample / walk through / pointer using NAudio

Thanks,

 

Coordinator
May 14, 2011 at 9:19 AM

yes, you need to use the RawSourceWaveStream. You have to tell it the WaveFormat that your headerless audio is in.

Mark

May 16, 2011 at 10:05 AM

Thanks Mark,

While I am using RawSourceWaveStream I could able to run my HeaderLess audio stream, but now the effect is too noisy. By some R&D I could able to find that Audio File I am playing is  44.1 KHz 16bit Stereo which is encoded to 44.1 Khz 4 bit.  I am not able to convert (decode) it back, so that I can play the normal song.

 

Kindly help !

TIA

Coordinator
May 16, 2011 at 10:15 AM

four bit??!! that would sound terrible! Is it actually something like ADPCM?

Mark

May 16, 2011 at 10:31 AM

Mark,

The sound is terrible, Kindly help me with some pointers for decoding / expand it to 16 bit Stereo using NAudio. ( or as a matter of fact anywhere !)

Thanks,

Coordinator
May 16, 2011 at 12:41 PM

well without information about your raw file, you must guess. You could try:

var a = new AdpcmWaveFormat(44100, 1);
var b = new ImaAdpcmWaveFormat(44100, 1, 4);
Then you would need to pass the RawSourceStream into a WaveFormatConversionStream. For example:

var outputStream = WaveFormatConversionStream.CreatePcmStream(rawSourceStream);
Mark