public void parse(ByteBuffer input) { super.parse(input); version = input.getShort(); revision = input.getShort(); vendor = input.getInt(); channelCount = input.getShort(); sampleSize = input.getShort(); compressionId = input.getShort(); pktSize = input.getShort(); long sr = input.getInt() & 0xffffffffL; sampleRate = (float) sr / 65536f; if (version == 1) { samplesPerPkt = input.getInt(); bytesPerPkt = input.getInt(); bytesPerFrame = input.getInt(); bytesPerSample = input.getInt(); } else if (version == 2) { input.getInt(); /* sizeof struct only */ sampleRate = (float) Double.longBitsToDouble(input.getLong()); channelCount = (short) input.getInt(); input.getInt(); /* always 0x7F000000 */ sampleSize = (short) input.getInt(); lpcmFlags = (int) input.getInt(); bytesPerFrame = (int) input.getInt(); samplesPerPkt = (int) input.getInt(); } parseExtensions(input); }
public void parse(ByteBuffer input) { super.parse(input); version = input.getShort(); revision = input.getShort(); vendor = input.getInt(); channelCount = input.getShort(); sampleSize = input.getShort(); compressionId = input.getShort(); pktSize = input.getShort(); long sr = input.getInt() & 0xffffffffL; sampleRate = (float) sr / 65536f; if (version == 1) { samplesPerPkt = input.getInt(); bytesPerPkt = input.getInt(); bytesPerFrame = input.getInt(); bytesPerSample = input.getInt(); } else if (version == 2) { input.getInt(); /* sizeof struct only */ sampleRate = (float) Double.longBitsToDouble(input.getLong()); channelCount = (short) input.getInt(); input.getInt(); /* always 0x7F000000 */ sampleSize = (short) input.getInt(); lpcmFlags = (int) input.getInt(); bytesPerFrame = (int) input.getInt(); samplesPerPkt = (int) input.getInt(); } parseExtensions(input); }
public void parse(ByteBuffer input) { super.parse(input); version = input.getShort(); revision = input.getShort(); vendor = input.getInt(); channelCount = input.getShort(); sampleSize = input.getShort(); compressionId = input.getShort(); pktSize = input.getShort(); long sr = input.getInt() & 0xffffffffL; sampleRate = (float) sr / 65536f; if (version == 1) { samplesPerPkt = input.getInt(); bytesPerPkt = input.getInt(); bytesPerFrame = input.getInt(); bytesPerSample = input.getInt(); } else if (version == 2) { input.getInt(); /* sizeof struct only */ sampleRate = (float) Double.longBitsToDouble(input.getLong()); channelCount = (short) input.getInt(); input.getInt(); /* always 0x7F000000 */ sampleSize = (short) input.getInt(); lpcmFlags = (int) input.getInt(); bytesPerFrame = (int) input.getInt(); samplesPerPkt = (int) input.getInt(); } parseExtensions(input); }