okay so here is the deal..
I am capturing the audio stream from microphone via naudio WaveIn method.. Now this allows me to save my capture straight into a wav file continuously.
Now i want this wav to be continuously uploaded on my ftp account. i.e the user is rec from mic.. his input is being stored into a file..and this file is being uploaded to my ftp.
I am currently facing problems regarding file lock which certainly does not allow me to access the same file at the same time it is being written.
I would be grateful to you if you can suggest me a method to upload my stream directly to my ftp account which does not involve this file issue
This is my code for recording:
Dim recordingFormat As New WaveFormat(8000, 16, 1)
writer = New WaveFileWriter("recorded.wav", recordingFormat)
waveInStream = New WaveIn()
waveInStream.DeviceNumber = 0
waveInStream.WaveFormat = recordingFormat
AddHandler waveInStream.DataAvailable, AddressOf waveInStream_DataAvailable
waveInStream.StartRecording()
And for continuously saving the stream into file:
writer.Write(e.Buffer, 0, e.BytesRecorded)
I want this ^ to to be fed directly into the ftp buffer..
Any help will be appreciated. TIA !