抱歉才看到,文章里有写到的:
public static short[] bytes2Shorts(byte[] bytes) {
if (null == bytes) {
return null;
}
short[] shorts = new short[bytes.length / 2];
ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(shorts);
return shorts;
}
[Android开发备忘]关于AudioRecord和AudioTrack的缓冲区的理解,及避坑指南文档说明: 关于本人文章的说明[https://www.jianshu.com/p/c979196b3d38] 本文档适合刚接触安卓录音开发的新手,大佬见笑。 本文档是本人在...