I have a recorder application(CSHARP) where i use NAudio to record/playback audio. Our need is to Insert and overwrite audio in an existing wav file. Currently, for inserting audio, i use the current position of the wav file and do a split. Merge the new wav file to original one and merge with the rest of the file. When overwrite, i take the current position of the original audio and merge the new audio from that position. This process seem to work ok but for some reason i think reading the file and writing a file takes a big toll. When we do a fast recording,stop recording, rewinding, recording, stop recording and so on.. the request to file gets clogged up and at some point i get File IO exception error saying "The file is in use by another process.." (Note: We use a footpedal equipment with 3 keys assigned for recording, play and rewind. The issue we have is when we bang on the pedals faster.)
i am really stuck at this point as i am unable to resolve this issue. I will need some expert help. Is there a way to insert audio from a specific position in a file without doing Split and Merge? PLSSSSSSSSS Help!!