Hi Vincent,
Is my understanding correct here?
In the wifi_audio_app mDNS advertiser is the speaker device which advertises with the service "CC3200._audio._udp.local." Then the MIC side uses sl_NetAppDnsGetHostByService to detect the speaker device including it's IP address and service port. Is there a reason for mDNS advertising to be done on the speaker side? I think that this can be done on either side. Based on this observation I decided to do the following.
The streaming device 1 will advertise with the service "CC3200._audio_stream1._udp.local." at PORT 5050" The streaming device 2 will advertise with the service "CC3200._audio_stream2._udp.local." at PORT 5051.
#ifndef MULTICAST lRetVal = sendto(g_UdpSock.iSockDesc, \ (char*)(pRecordBuffer->pucReadPtr),PACKET_SIZE,\ 0,(struct sockaddr*)&(g_UdpSock.Client),\ sizeof(g_UdpSock.Client)); if(lRetVal < 0) { UART_PRINT("Unable to send data\n\r"); LOOP_FOREVER(); } #else //MULTICAST
I think I can use sendto function from each streaming device to send the data out.
On the receiver side I'll use GetServiceList() function or sl_NetAppDnsGetHostByName() to identify IP address of these specific device and the port of service. I can use recvfrom twice to receive each stream from their respective port. I can use receive function twice to read audio data from respective ports.
Does this understanding make sense to you?
Thanks
Shavinda