mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-12 14:57:20 +00:00
[client/idd] network: discard stale audio after stalls
Keep PCM and its clock sample in cancellable datagrams so recovery cannot replay audio buffered before a Wi-Fi stall. Drop blocked real-time packets with an explicit discontinuity and make a newer reconnect supersede stale audio authorities.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4747,13 +4747,18 @@ retry:
|
||||
HandshakeState handshake;
|
||||
uint64_t sessionEpoch;
|
||||
uint32_t maxPayload;
|
||||
bool closing;
|
||||
{
|
||||
CSRWSharedLock guard(connection.lock);
|
||||
handshake = connection.handshake;
|
||||
sessionEpoch = connection.sessionEpoch;
|
||||
maxPayload = connection.maxPayload;
|
||||
closing = connection.closing;
|
||||
}
|
||||
|
||||
if (closing)
|
||||
return true;
|
||||
|
||||
if (handshake == HandshakeState::WAITING_HELLO)
|
||||
return packet.envelope.service == LG_NET_SERVICE_CORE &&
|
||||
packet.envelope.messageType == LG_NET_CORE_MESSAGE_HELLO &&
|
||||
@@ -5188,6 +5193,8 @@ retry:
|
||||
const uint16_t serviceMask = UINT16_C(1) << packet.envelope.service;
|
||||
{
|
||||
CSRWExclusiveLock guard(connection.lock);
|
||||
if (connection.closing)
|
||||
return true;
|
||||
const bool serviceReady = packet.envelope.service ==
|
||||
LG_NET_SERVICE_CORE ||
|
||||
((connection.selectedServices & serviceMask) &&
|
||||
|
||||
Reference in New Issue
Block a user