mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 01:04:06 +02:00
remove blank if and fix ping reply construction
This commit is contained in:
parent
fa1825fa32
commit
7ceacd2751
2 changed files with 4 additions and 5 deletions
|
@ -96,10 +96,6 @@ void AudioInjector::injectAudio() {
|
|||
// send off this audio packet
|
||||
nodeList->writeDatagram(injectAudioPacket, audioMixer);
|
||||
|
||||
if (audioMixer && nodeList->getNodeActiveSocketOrPing(audioMixer)) {
|
||||
|
||||
}
|
||||
|
||||
currentSendPosition += bytesToCopy;
|
||||
|
||||
// send two packets before the first sleep so the mixer can start playback right away
|
||||
|
|
|
@ -605,13 +605,16 @@ QByteArray NodeList::constructPingReplyPacket(const QByteArray& pingPacket) {
|
|||
QDataStream pingPacketStream(pingPacket);
|
||||
pingPacketStream.skipRawData(numBytesForPacketHeader(pingPacket));
|
||||
|
||||
PingType_t typeFromOriginalPing;
|
||||
pingPacketStream >> typeFromOriginalPing;
|
||||
|
||||
quint64 timeFromOriginalPing;
|
||||
pingPacketStream >> timeFromOriginalPing;
|
||||
|
||||
QByteArray replyPacket = byteArrayWithPopluatedHeader(PacketTypePingReply);
|
||||
QDataStream packetStream(&replyPacket, QIODevice::Append);
|
||||
|
||||
packetStream << timeFromOriginalPing << usecTimestampNow();
|
||||
packetStream << typeFromOriginalPing << timeFromOriginalPing << usecTimestampNow();
|
||||
|
||||
return replyPacket;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue