Java tutorial
//package com.java2s; /** * This class is part of JCodec ( www.jcodec.org ) This software is distributed * under FreeBSD License * * @author Jay Codec * */ import java.nio.ByteBuffer; public class Main { public final static float r24 = 1f / 8388608f; private static int toFloat24LE(ByteBuffer buf, float[] out) { int samples = 0; while (buf.remaining() >= 3 && samples < out.length) { out[samples++] = r24 * ((((buf.get() & 0xff) << 8) | ((buf.get() & 0xff) << 16) | ((buf.get() & 0xff) << 24)) >> 8); } return samples; } }