如何获取 AudioInputStream 的持续时间?
我想获取 AudioInputStream 的持续时间(以微秒为单位)。我怎样才能轻松做到这一点?我发现如何获取音频文件的持续时间:,但不能这样做,因为封装。我看到的唯一对象是 AudioInputStream 类的实例。
I want to get duraction of an AudioInputStream (in microseconds). How can I easily do that? I found how can I get duration of an audio file:, but can't do that, because of encapsulation. The only object I see is the instance of an AudioInputStream class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
getFrameLength()
返回以帧为单位的流长度,getFormat().getFrameRate()
将为您提供每秒帧的数量。getFrameLength()
returns the stream length in frames,getFormat().getFrameRate()
will give you the number of frames per second.