<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’ve tried the multicast option with same setup, but unfortunately I’m getting the same issue (bad header tag error and distorted sound). <div><br></div><div>Just out of curiosity I recorded the <a href="https://soundcloud.com/apolotary/multicast-glitch">audio output I was getting</a></div><div><br></div><div>Best regards,</div><div>Bektur<br><div><br><div><div>On Jul 25, 2014, at 3:25 AM, Martin Peach <<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Looking through the source code of udpsend~ I don't think broadcast sends a different packet, I'll keep looking.<br>Also note that multicast is supported. Have you tried that? It should be more efficient than broadcast.<br>(udpsend-help has the messages used by [udpsend~] for multicast, udpsend~-help needs updating).<br><br>Martin<br><br><br>On 2014-07-24 14:46, Bektur wrote:<br><blockquote type="cite">Thanks for the advice!<br><br>I’m sorry for the late reply, but I finally got my hands on a windows machine, and here’s what I got:<br><br>- The issue with bad header tag in case of a broadcast is still there, so at least it’s not related to platform-specific implementation<br>- I managed to make it work by creating a set of separate [udpreceive~] objects for each client and they work almost without any noticeable problems with sound<br><br>I wish I could use wired connection, but since my clients are mobile devices, so I have to go with Wi-Fi.<br><br>Just in case if someone else would be looking for this problem, I think jack.udp is another possible option (since IIRC netjack and jackport don’t have mobile implementations). However, for now libpd + [udpreceive~]/[udpsend~] work well in local wireless networks.<br><br>Best regards,<br>Bektur<br><br>On Jul 21, 2014, at 11:06 PM, Martin Peach <<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>> wrote:<br><br><blockquote type="cite">On 2014-07-21 12:50, Bektur wrote:<br><blockquote type="cite"><br><blockquote type="cite">I’m running a simple iOS application with libpd and udpreceive~ objects in the patch. The audio is sent from a computer with udpsend~ object, with only one channel currently being used. Whenever I stream to a single IP address everything works fine with almost unnoticeable latency. However, when I try to broadcast to multiple addresses in the network (as shown in udpsend~ help patch), I get two kinds of errors:<br><br>– On OS X, block size >= 512 triggers “Message too long (40)” error. It happens only on OS X (tried the same patch on ubuntu, and this error didn’t reappear), one of the possible solutions I found was to use smaller block size, but in such case it would cause the second kind of error<br><br>– On a client I get "udpreceive~: bad header tag (1)” error with incrementing numbers in the error. At first, I thought the libpd implementation was to blame, but it also happened when I run the same send and receive patches on two different computers running Pd-extended and connected over a local wireless network.<br></blockquote><br><br>I haven’t found any workaround for this yet, but I’m planning to try reproducing these issues on a windows machine with ASIO drivers.<br></blockquote><br>I suppose if you do it over a wired connection it will work better. Probably the WiFi is dropping packets and retransmitting, so things get out of sync. I don't know how broadcast UDP is implemented in WiFi, but I imagine it involves sending copies of the same packet to each receiver rather than a single packet addressed to multiple receivers.<br><br>Martin<br></blockquote><br><br><br></blockquote><br></blockquote></div><br></div></div></body></html>