limelight-stream/limelight-common — pull request #2 by irtimmer (2014-01-22 15:17:03+00:00)
Title: Remove depacketizer thread

Audio latency is currently a big problem in Limelight. The main cause lay in the excessive usage of buffers. While video can be played faster this isn't the case with audio. So if you wait long enough buffers will fill and the audio delay increase. At least on the Raspberry Pi the situation can be improved by removing the depacketizer thread. This thread can be merged with the receive thread because the OS already provides us with a packet buffer (RTP_RECV_BUFFER) so there is no need to maintain another one.

For Limelight-pi I decreased the size of the the other buffers as well in irtimmer@dc35277393a7548215b3838b719421251a2d3a16 to improve audio latency. It works perfectly over wired but I have no idea what the effect is on wireless connections. Maybe it would be nice to make these configurable so you can choose between less latency (for wired) or less artifacts (for wireless)