更新时间:2022-06-24 22:38:12
这可以通过完成Java Sound API。
AudioSystem
获取 AudioInputStream 。 AudioFormat
的流。 byte []
以适应格式。例如。 8位单声道是字节[1]
。 16位立体声是 byte [4]
。 byte [] 并且它将逐帧包含声音。
AudioSystem
to get an AudioInputStream
from the file.AudioFormat
.byte[]
to suit the format. E.G. 8 bit mono is a byte[1]
. 16 bit stereo is byte[4]
.byte[]
and it will contain the sound, frame by frame.