This project has moved and is read-only. For the latest updates, please go here.

play pcm raw data "Not a WAVE file - no RIFF header"

Nov 8, 2013 at 3:39 PM
Dear experts,
Sorry for this simple question, but I have just started NAudio , and have no idea to make it.
I want to play pcm file without header using the demo application ,but i got this error
Not a WAVE file - no RIFF header

Please help
Nov 8, 2013 at 3:40 PM
use RawSourceWaveStream, passing in a FileStream/MemoryStream with the raw data, and a WaveFormat structure that indicates the format of the raw data
Nov 8, 2013 at 4:37 PM
dear Markheath,

Can you please post few code (for me please).

Thanks for support
Nov 11, 2013 at 10:19 AM
var rawStream = File.OpenRead("rawaudio.bin");
var waveFormat = new WaveFormat(16000, 16, 1); // must match the waveformat of the raw audio
var waveOut = new WaveOut();
var rawSource = new RawSourceWaveStream(rawStream, waveFormat);
Nov 16, 2013 at 9:42 PM
works like magic.
Thanks, :)
Feb 20, 2014 at 2:08 PM
Nice but how it work if i want to sample in bvyte array and not in wave file?
Feb 24, 2014 at 8:23 AM
use a MemoryStream