Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
psy0rz committed Jan 13, 2025
1 parent 5482928 commit fb297b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ledder/server/drivers/DisplayQOISudp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export class DisplayQOISudp extends DisplayQOIS {
const maxFramesLag = 24
const maxTimeLag = 250

let statsBytes=0

//buffer this many frames
const lag = Math.min(maxTimeLag, maxFramesLag * this.defaultFrameTimeMicros / 1000)
// console.log("Max lag", lag)
Expand Down Expand Up @@ -154,6 +156,8 @@ export class DisplayQOISudp extends DisplayQOIS {
this.nextSyncOffset = this.nextSyncOffset - payload.length

const p = Uint8Array.from(packet)
statsBytes=statsBytes+p.length

for (const s of this.sockets) {
try {
s.send(p)
Expand All @@ -173,5 +177,6 @@ export class DisplayQOISudp extends DisplayQOIS {
// console.error("bug: sync offset not 0??")
// }
}
return statsBytes
}
}

0 comments on commit fb297b2

Please sign in to comment.