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

Save 30 Seconds Only

Feb 24, 2014 at 3:06 PM
Edited Feb 24, 2014 at 3:06 PM
Hi All,

Am new to NAudio, I am trying to create an application that will write to file (.wav) the last 30 seconds of Audio since having started capturing (Using WasapiLoopbackCapture()).

My question is do I need to create my own CircularDataStack and fill it with OnDataAvailable() or is there a way to do this already using BufferedWaveProvider maybe?

Thanks in advance for any help!
Feb 24, 2014 at 4:57 PM
I'm pretty sure NAudio's CircularBuffer does not overwrite data already in there (once it's full no more audio gets added). So you'd need to make your own that discards existing audio when new audio is written in.
Feb 24, 2014 at 6:00 PM
Thanks for the reply Mark!