This project has moved and is read-only. For the latest updates, please go here.

Getting end of stream error when reading a stream using WavFileReader

Apr 30, 2013 at 1:10 AM
I am downloading a wav file from an http server, copying it to a memorystream and then trying to open it for conversion via WavFileReader.

When I do this, I get a "can't read past end of stream" exception. If I write the bytes (using WriteAllBytes) to a file and then open using WavFileReader passing in a filename, it works just fine. The file is encoded at 13kbps (I can provide the file upon request).

what am I doing wrong? At this point, I'm thinking of writing the file out to a tmp file and then just making sure I delete it.
May 6, 2013 at 7:19 PM
Do you reposition the MemoryStream to 0 before passing it into the WaveFileReader?