【问题标题】:Determine the length (in milliseconds) of an mp3 file in VB.net在 VB.net 中确定 mp3 文件的长度(以毫秒为单位)
【发布时间】:2011-02-11 17:36:03
【问题描述】:

有没有办法在 VB.net 中获取 mp3 的时间长度?我有 TagLib,但它似乎没有任何功能。

【问题讨论】:

    标签: vb.net mp3 taglib-sharp


    【解决方案1】:

    我认为您正在寻找返回 TimeSpan 对象的 TagLib.File.Properties.Duration。从那里您可以使用 TotalSeconds 以秒为单位获取 mp3 的长度。

    【讨论】:

    • 还有 TotalMilliseconds 毫秒。 :)
    【解决方案2】:

    将此添加到轨迹栏的计时器,不要忘记在其中添加标签

     Label4.Text = AxWindowsMediaPlayer1.Ctlcontrols.currentItem.durationString

    玩家

    【讨论】:

      猜你喜欢
      • 2010-11-02
      • 2011-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-26
      • 1970-01-01
      相关资源
      最近更新 更多