Determine the length (in milliseconds) of an mp3 file in VB.net

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 06:07:33

问题


Is there a way to get the time length of an mp3 in VB.net? I have TagLib, but it doesn't seem to have any functionality for it.


回答1:


I think you are looking for the TagLib.File.Properties.Duration, which returns a TimeSpan object. From there you can use TotalSeconds to get the length of the mp3 in seconds.




回答2:


add this to timer of track bar and dont forgot to add label in

 Label4.Text = AxWindowsMediaPlayer1.Ctlcontrols.currentItem.durationString

player



来源:https://stackoverflow.com/questions/4972194/determine-the-length-in-milliseconds-of-an-mp3-file-in-vb-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!