1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

better celt handling

This commit is contained in:
Robin Appelman 2017-03-05 23:54:44 +01:00
commit 2601de65a0

View file

@ -5,7 +5,7 @@ export function VoiceInit(stream: BitStream): VoiceInitPacket {
const codec = stream.readASCIIString(); const codec = stream.readASCIIString();
const quality = stream.readUint8(); const quality = stream.readUint8();
// no clue, from 2017-2-14 update // no clue, from 2017-2-14 update
const extraData = (codec === 'vaudio_celt') ? stream.readUint16() : 0; const extraData = (codec === 'vaudio_celt' && quality === 255) ? stream.readUint16() : 0;
return { return {
packetType: 'voiceInit', packetType: 'voiceInit',
codec: codec, codec: codec,