Skip to content

Commit

Permalink
fix(bot): fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Oct 26, 2024
1 parent ac4849f commit 29bcc9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/bot/src/modules/recorder/webapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export class WebappClient {
let granulePos = message.readUIntLE(EnnuicastrParts.data.granulePos, 6);

// Calculate our "correct" time to make sure it's not unacceptably far off
const arrivalHrTime = process.hrtime(this.recording.startTime);
const arrivalHrTime = process.hrtime(this.recording.startTime!);
const arrivalTime = arrivalHrTime[0] * 48000 + ~~(arrivalHrTime[1] / 20833.333);

if (granulePos < arrivalTime - 30 * 48000 || granulePos > arrivalTime + 30 * 48000) granulePos = arrivalTime;
Expand Down Expand Up @@ -403,7 +403,7 @@ export class WebappClient {
const ret = Buffer.alloc(EnnuicastrParts.pong.length);
ret.writeUInt32LE(EnnuicastrId.PONG, 0);
data.copy(ret, EnnuicastrParts.pong.clientTime, EnnuicastrParts.ping.clientTime);
const tm = process.hrtime(this.recording.startTime);
const tm = process.hrtime(this.recording.startTime!);
ret.writeDoubleLE(tm[0] * 1000 + tm[1] / 1000000, EnnuicastrParts.pong.serverTime);
this.ws.send(this.wrapMessage(ret, clientId));
break;
Expand Down

0 comments on commit 29bcc9c

Please sign in to comment.