Reputation: 31
I am creating an application which streams audio over UDP. Currently it works fine, however it uses alot of network usage (upto 500kbps). Is this normal? Is there a way I can compress or slightly reduce the quality of the audio so it uses up less network usage?
WasapiCapture capture = new WasapiLoopbackCapture();
capture.Initialize();
capture.Start();
capture.DataAvailable += (object sender, DataAvailableEventArgs e) =>
{
// Send data here (works fine)
};
Upvotes: 0
Views: 128
Reputation: 1696
Yes this is normal. Its capturing at the default rate. You need to set your bitrate and codec.
This is what I am doing:
_soundIn = new WasapiLoopbackCapture(0, new CSCore.WaveFormat(44100, 16, 1, CSCore.AudioEncoding.MpegLayer3));
Upvotes: 0