An unhandled exception of type 'System.ArgumentException' occurred in NAudio.dll
Additional information: Unsupported sourceStream format
This is my current issue! I followed a tutorial on basic playing and pausing of a .wav file in Naudio, random .wav songs I found online throw this exception, yet the .wav that was provided in the video does not.
I can't seem to find an answer to this issue, but I am assuming it has something to do with bitrate of the different .wav files.
Can anyone confirm or deny this?
I too ran into this problem, and although am a complete coding beginner I found a solution that works. I believe you are referring to giawa videos tutorial - 'C# Audio Tutorial 1 - Wave File with NAudio'
The problem arises when there is different compression methods used for the .wav file: https://support.microsoft.com/en-us/kb/89879 Not sure on the details, but i believe the tutorial uses PCM (stores absolute scale -1.0 - +1.0) where as I (we) used a wave file using ADPCM (stores the differences between samples).
I found the solution here: https://github.com/naudio/NAudio/wiki/Playing-an-Audio-File . Basically the class wavefilereader cant actually read my (our) wave files. However another class MediaFoundationReader can (as well any media foundation codec installed on your computer.
Like I said, have no idea what i'm talking about, but it worked for me. Hopefully it helps someone, somewhere.