Here you can find the source of allocateAudioBuffer(int size)
public static ByteBuffer allocateAudioBuffer(int size)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.ByteOrder; public class Main { public static ByteBuffer allocateAudioBuffer(int size) { ByteBuffer bb = ByteBuffer.allocateDirect(size); bb.order(ByteOrder.LITTLE_ENDIAN); return bb; }//from w w w. j a v a 2 s . c o m }