开发者

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

开发者 https://www.devze.com 2023-02-09 20:04 出处:网络
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.I think you are looking for the TagLib.File.Properties.Du

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.


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.


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

 Label4.Text = AxWindowsMediaPlayer1.Ctlcontrols.currentItem.durationString

player

0

精彩评论

暂无评论...
验证码 换一张
取 消