Pretty good audio sync if I do say so myself :)
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user