Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get(buf: Buffer, off: number): ISoundSampleDescriptionVersion {
return {
version: Token.INT16_BE.get(buf, off),
revision: Token.INT16_BE.get(buf, off + 2),
vendor: Token.INT32_BE.get(buf, off + 4)
};
}
};
get(buf: Buffer, off: number): ISoundSampleDescriptionV0 {
return {
numAudioChannels: Token.INT16_BE.get(buf, off + 0),
sampleSize: Token.INT16_BE.get(buf, off + 2),
compressionId: Token.INT16_BE.get(buf, off + 4),
packetSize: Token.INT16_BE.get(buf, off + 6),
sampleRate: Token.UINT16_BE.get(buf, off + 8) + Token.UINT16_BE.get(buf, off + 10) / 10000
};
}
};
private async parseCrc(): Promise {
this.crc = await this.tokenizer.readNumber(Token.INT16_BE);
this.offset += 2;
return this.skipSideInformation();
}