Can you please post up the code that you are using for this?
Are you using a modified version of the NAudio library for this?
The NAudio library has changed a bit since that tutorial was written; you can either use the version of the library where the modifications were made or reapply those modifications to the current version.
I'm not sure if this type of functionality has been included in the core latest version on SVN; I haven't had a chance to check out the latest updates from SVN recently but if your interested in this type of functionality I would suggest you start there.
Having said all this, the normal reason you would get an error like this is if you are loading a format which NAudio doesn't handle or you have incorrectly told NAudio the format of a file type that is supported. So I would suggest you check if you are preparing
the RIFF header correctly for the data you have saved.