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, creating a 16-bit PCM 22050Hz WAV file with NAudio makes the program crash when I try to play it, even if they both came from the same source. 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?

Any help would be greatly appreciated. Thanks!

by SilentKillerFL via /r/csharp

Leave a Reply