AudioFile.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:cassette-nibbler 作者:
private void initialise() throws IOException, UnsupportedAudioFileException {
    ensureMarkResetIsSupported();
    currentTimeIndex = 0.0;
    audioInputStream = AudioSystem.getAudioInputStream(inputStream);
    convertAudioInputStreamToPcmSigned();

    sampleLengthInSeconds = (double)(1.0f / audioInputStream.getFormat().getSampleRate());
    bytesPerFrame = audioInputStream.getFormat().getFrameSize();
    if (bytesPerFrame == AudioSystem.NOT_SPECIFIED)
        bytesPerFrame = 1;

    audioBytes = new byte[bytesPerFrame];
    recordFileDataInLoggingOutput();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号