MCPcopy Create free account
hub / github.com/zhuker/lamejs / CRC_writeheader

Method CRC_writeheader

src/main/java/mp3/BitStream.java:235–248  ·  view source on GitHub ↗
(final LameInternalFlags gfc,
			final byte[] header)

Source from the content-addressed store, hash-verified

233 }
234
235 public final void CRC_writeheader(final LameInternalFlags gfc,
236 final byte[] header) {
237 int crc = 0xffff;
238 /* (jo) init crc16 for error_protection */
239
240 crc = CRC_update(header[2] & 0xff, crc);
241 crc = CRC_update(header[3] & 0xff, crc);
242 for (int i = 6; i < gfc.sideinfo_len; i++) {
243 crc = CRC_update(header[i] & 0xff, crc);
244 }
245
246 header[4] = (byte) (crc >> 8);
247 header[5] = (byte) (crc & 255);
248 }
249
250 private void encodeSideInfo2(final LameGlobalFlags gfp,
251 final int bitsPerFrame) {

Callers 5

encodeSideInfo2Method · 0.95
VBRTagFunction · 0.80
zbFunction · 0.80
VBRTagFunction · 0.80
getLameTagFrameMethod · 0.80

Calls 1

CRC_updateMethod · 0.95

Tested by

no test coverage detected