Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

VoiceData not being parsed correctly? #7

Open
fx-chun opened this issue Oct 11, 2018 · 2 comments
Open

VoiceData not being parsed correctly? #7

fx-chun opened this issue Oct 11, 2018 · 2 comments

Comments

@fx-chun
Copy link

fx-chun commented Oct 11, 2018

Looking at the hex dumps of the data portion of VoiceData packets, it seems that they're not being parsed properly (as portions of obviously not voice data are showing up).

Relevant excerpt from the hexdump of a VoiceData packet:

000000f0  33 04 00 04 a1 01 00 00  09 00 00 00 2d 62 61 63  |3...........-bac|
00000100  6b 20 20 20 00 04 a1 01  00 00 0a 00 00 00 20 2b  |k   .......... +|
00000110  66 6f 72 77 61 72 64 00  04 a1 01 00 00 20 00 00  |forward...... ..|
00000120  00 20 61 6c 69 61 73 20  6e 6d 6f 76 5f 72 65 66  |. alias nmov_ref|
00000130  6f 72 77 61 72 64 20 2b  66 6f 72 77 61 72 64 20  |orward +forward |
00000140  00 05 a2 01 00 00 8d 05  00 00 16 00 00 00 1b 0b  |................|

Code I'm using to grab the data:

for (const packet of analyser.getPackets()) {
  if (packet.packetType === "voiceData") {
      var buffer = packet.data.readArrayBuffer(packet.length);
      fs.writeFileSync(..., buffer);
  }
}

Any ideas to wha'ts going on?

@icewind1991
Copy link
Collaborator

voicedata is not something I've put a lot of effort in since it's useless for my use case but I'll see if I can find some time to double check it.

That dump looks like it's from a pov demo, if so, can you check if the same problem occurs for stv demos

@fx-chun
Copy link
Author

fx-chun commented Oct 12, 2018

Thanks for the response!

I ran the same segment on an STV demo and got this from running strings on one of the packets

,1qUc@
2#!p
r="(
^=C}
<``zMM
E'5H
Yd{$
<~=I-
})m.
2L=@;
wXHr]QH
j+H,(.<
;mxu
0.0.0.0:27020
D!w2?i
SdZV
        C]~

So it looks like it affects STV demos as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants