Creating WAV files with NAudio

Hi, I'm trying to create audio files that can be read by an already existing application. Creating a 16-bit PCM 22050Hz WAV file in Audacity seems to play fine. However, a 16-bit PCM 22050Hz WAV file created with NAudio makes the program crash, even if they both came from the same source, and are both playable by other programs. Looking in Audacity or MediaInfo, both files seem to have the same sample rate, sample size and other characteristics.

I'm following the first code sample on this blog post.

So I'm wondering, what is Audacity doing that NAudio isn't, and how can I make NAudio do the job right?

I have uploaded the source mp3, WAV created in Audacity, and WAV created by NAudio here:

Any help would be greatly appreciated. Thanks!

by SilentKillerFL via /r/csharp

Leave a Reply