Server side sound improvements

This is a replacement for PR #1888. It contains:
* sending a timestamp with sound sample ;
* implement a callback when a ACK is received;
* a complete rewrite of the packet decoding logic.