Thanks for quick answer!
> What do you mean by RAW Wave Stream? Do you actually mean a wave file without a header specifying the contents of the file?
Yes, exactly, wave file with no header.
> If that's what you are referring to, then what you are missing is that you haven't specified the format for NAudio
OK , I get it... I know that info about my file: sample rate is 8000, mono channel, resolution is 8 bit, and compression format is 8-bit mu-Law.
> ...it's up to you to specify that information in the code by specifying it yourself before opening the stream.
Please, can you tell me how can I specify it in the code? I can create a WaveFormat object, such as:
WaveFormat wf = new WaveFormat(8000, 8, 1);
But how will I use that object? How can I create a WaveStream object, using specified WaveFormat and my raw audiostream (byte array)?
P.S. Just in case - the PCM-file is playable, I can open it with CoolEdit (using parameters from above) and play it...