Extension: UDP audio Chat. Voice. WiFi. Send sound over UDP

1.- UDP audio Chat. WiFi. Send sound over UDP.

Through this extension we can send audio from one mobile to another, using UDP. WiFi.

- Blocks.

- Example:

p299J_Voz_UDP.aia (12.1 KB)

- Designer.

- Blocks.


2.- Send and receive audio to the same device.

  • To do the first test we run the application (it works in MIT Companion). We get the IP of the device, in my case:

  • We write that IP in "To IP". We establish the same port to send and receive, in this case: 4444

  • We activate the Microphone and the Speaker. We speak in front of the mobile and we must listen to our voice.

  • To avoid sound feedback it is advisable to use an earphone.

  • In this example the application is sending and receiving the sound.


1 Like

3.- Chat with two mobiles.

  • In each mobile we put the IP and the port of the other mobile ("To IP" and "To Port"), we also establish the port through which we will receive the audio.


4.- Broadcast.

  • If instead of establishing the IP of a device, we write To IP: the sound will be sent to the entire network, and it will "enter" those devices that have port 4444 (in this example) activated with UDP.


5.- Credits.

  • The code to Get the Local IP is an adaptation of...