Hello, I hope you are well!
For some time I come with the idea of an application for live monitoring and I would like to send audio from the computer to a cell phone via wifi or ethernet (local network); however I do not have much knowledge in this field of networks and I would like to ask for your help to know more or less where to start or what are the steps to follow to transmit audio over the network.
Thank you very much.
You might want to check out RTP and AES67.
You will likely want to use UDP instead of TCP, and you will have to take care of things like buffering and jitter.
For sending you will probably want to capture audio samples in your audio callback handler and push them into a FIFO, and then on a separate thread send them out over the network. You will need to frame your packets that’s why something like RTP is worth a look.
On the receiving end, you will receive the the packets over the network on a non-real-time thread, extract the audio samples out of the received frames, and the push the samples onto a FIFO. Your audio callback handler on the receiving side will then read the samples out of the FIFO and write them to the output audio buffer for playback.
There’s a good real-time safe FIFO implementation here.
It is of course a bit more complicated than that, but hopefully that can point you in the right direction.
Finally, this project has a pretty basic implementation of an RTP buffer for sending and receiving audio over a network, but it’s fairly barebones and you will still need to take care of the network transport part.
The JUCE DatagramSocket class should work if you prefer to use JUCE for your network implementation.
Also, if sending over WAN and not LAN, you will also need to find a solution for NAT punch-though.
Here are two open source applications which stream audio and use JUCE, perhaps looking under the hood could help:
Thank you very much! I will look at them as soon as I have time!!