On Die, 2013-03-05 at 00:41 +0100, katja wrote:
I learned about 'ad hoc networks', where computers can be paired via Wifi and talk to each other directly, without a router. Never knew about this before. What a cool option that is.
Considering that in a wireless network only one device can talk per moment, you might be able to double your throughput and cut the latency in half with an ad-hoc network compared to a network managed by an access point as the access point repeats every message between local clients. One thing to consider is that often the wireless signal of mobile clients is weaker than the signal of the access point which means the maximum distance two ad-hoc clients can talk to each other is likely lower than in a managed network. Please note that I'm not really speaking from experience, so the theory might not translate well to practice.
Found a howto here:
https://help.ubuntu.com/community/WifiDocs/Adhoc
In ad hoc mode, latency is lower, although on average not as low as over cable, and with more fluctuation. Moreover, there was considerable packet loss, which did not happen in wired LAN. Therefore, tcp protocol should probably be used instead, to check for packet loss and eventually resend packets.
I found that [udpsend~] can not send packets of 64 samples. It seems that 256 samples is the minimum. Why? Maybe it is best to pack each signal vector in a list and use the [tcpsend] / [tcpreceive] combo instead.
Again speaking theoretically, I doubt that TCP will help much. It guarantees the integrity of the data stream on the receiving end, but it doesn't care about timing constraints. In case of a network lag, the receiving end would just wait until the data arrives which also means an audio drop-out. However, since it wouldn't loose any data, the delay on the receiving end would increase with every drop-out. Of course, with a bigger delay, the drop-outs are getting less likely. If your goal is low-latency, I'd still go for UDP. There might be ways to compensate for lost packets, maybe by repeating the last one, hoping this would make lost packets less audible (I don't really know, just thinking).
Roman