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

Audio Recording Performance and Save the recorded byte[] to a file every hour

Jun 5, 2014 at 6:00 AM
If we use NAudio to build a recording system to record 4 channels from MAudio 1010LT sound card simultaneously , the recording will be 24 a day, 7 days a week, and every hour the recorded byte will be saved in a WAV file.

Could you anyone here help us about it? it is possible? and samples for us to refer to?

Jun 5, 2014 at 8:17 AM
Yes, it is possible. You need to keep rolling over to new WAV files to prevent them from getting too long.
The main challenge is to record all four input channels simultaneously. Your WaveIn driver may not let you do this, so you'd have to look at WasapiCapture or the AsioOut class which does actually also support recording.
Jun 5, 2014 at 8:38 AM
Thanks Mark,, i will use WasapiCapture /AsioOut the ones you recomend, by the way you mentioned about rolling over , i am afraid that it might lose some byte. I think to rollover to a new WAV i have to call Stop to call BenginRecord again to save the current one and create a new WAV file? If i know is wrong could you show me more in detail if some line of sample codes or guides.
Many Thanks to you
Jun 5, 2014 at 9:36 AM
no need to restart recording. In the DataAvaialbale handler, if the existing WaveFileWriter is too long, close it, create a new one and start writing to that.