给一个File你可以写
File file = ...;AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file);AudioFormat format = audioInputStream.getFormat();long frames = audioInputStream.getframeLength();double durationInSeconds = (frames+0.0) / format.getframeRate();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)