Possible Duplicates:
c# capture microphone play a wav file c# code
I need some examples with how to record and send开发者_如何学编程 a .wav file over udp. If I call a number i would like to hear this .wav file as response.
I have to play the wav sound in real time. I can do this by using udp socket,no?
Why do you want to send .wav files over the network? Compressing them before is usually a good idea. If you transmit speech the speex codec is good, for music you could use vorbis.
And why UDP? I'd start with TCP since it's easier to use, and only switch to UDP if really necessary. Typically UDP is better if you have significant packet loss, because you can simpy skip dropped packets. But normally packet loss is rather uncommon and TCP sufficies.
There are many similar questions. For example see this question: c# capture microphone
精彩评论