Voice Conference - How Do More People Talk?

First of all, I'm just an amateur, so I'm sorry if this is a stupid question or I'm too naive. (This also means that I cannot buy expensive libraries)

In this situation: I am creating a simple voice chat application in C # .NET (something like Ventrilo or TeamSpeak, but only for about 15 or 20 people and it works on the local network at a speed of 100 Mbps). I have a working server (spawning thread for each client) and a client application that uses UDP to connect and DirectSound to capture and play sound. I can do "1 on 1", but I can not understand one of the most important things:

How do I have more than two people in a conversation?

+3
source share
1 answer

You need some kind of centralized place to send packets back via multicast, otherwise you need a decentralized approach where every client connects to every other client and every client accepts multicast. What you want to avoid is to force the machines to forward their data to all other machines, which will cause O (n) to send a message to each machine (and slow I / O).

In any case, you have the same problem: how to combine audio streams. One simple mechanism to achieve this is bitwise or signals together before sending them back (either from a network port or out to your speakers), but this assumes that you have access to uncompressed and reasonably synchronized streams.

+2

Source: https://habr.com/ru/post/1731555/


All Articles