Pretty good audio sync if I do say so myself :)

This commit is contained in:
watsonb8
2019-11-29 22:04:55 -05:00
parent 8bea1d03da
commit 41e853b1c6
7 changed files with 25 additions and 14 deletions

View File

@ -45,13 +45,14 @@ namespace Aurora.Utils
socket.ReceiveTimeout = 3000;
stopwatch.Start();
socket.Send(ntpData);
stopwatch.Stop();
socket.Receive(ntpData);
socket.Close();
}
//Offset to get to the "Transmit Timestamp" field (time at which the reply
//departed the server for the client, in 64-bit timestamp format."
const byte serverReplyTime = 40;
byte serverReplyTime = 40;
//Get the seconds part
ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);