Possible Duplicate:
How would you code an efficient Circular Buffer in Java or C#
Are there any examples or documentation around for how to use NAudio to record to a circular buffer?
Also, how about how to copy data from memory and store it into a wav file?
In this application, I need to be sampling the data to determine the start of an event, and then start recording 2 seconds before that event. So I figure the easiest way is to constantly be recording into a circular buffer. From there I can copy the data out to store in a file.