Reputation:
I am currently developing a c# Windows Form. My intention is to create a form that can make calls to other PCs in the same network. So far I have found solutions that record the audio from my microphone and then convert it to bytes and send it using Tcp sockets. The thing is, is there a way to directly convert the audio to bytes and send it through a socket without recording the audio in a file and then send it.
Thanks in advance.
Upvotes: 1
Views: 1126
Reputation: 147
would converting the record to a memorystream be what your looking for? if so you want this How to record audio using naudio onto byte[] rather than file
You can then write the stream to a tcpsocket. (you could write the thing direct to networkstream but i would consider it bad practice)
It would be wise to write samplerate*3 just in case of lantcy issues.
Upvotes: 1