This project has moved. For the latest updates, please go here.

Select specific data source to make wav file

May 3, 2010 at 3:17 PM

I'm running a project to get data over a USB connection and save it to a WAV file.


This is written in C#

We're using a PICDEM microcontroller and have succesfully programmed both client and hardware to send and receive data.


Now, I was to use Naudio to save this data to a .WAV file.


I've seen the 5th demo, which records from the sound card.

I've been trying to adapt this code in order to use the data from the device, but with no success.

Instead of using the soundcard, I wanna use the array of bytes that I receive from the microcontroller.


So, it's just byte[certain_length] that contains the data.

That is what I'd be using to write to a WAV file, and I can't find how.

I'm probably missing something obvious here, but I'd rather just ask then spend the next few days going nuts about this.

May 6, 2010 at 1:49 PM

the way to go is to create a class that inherits from WaveStream. Then in its Read method, return the bytes from your data array