Results 1 to 11 of 11

Thread: Demo Program I did for a radio engineer

Hybrid View

  1. #1
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,667

    Re: Demo Program I did for a radio engineer

    Windows natively supports duration for mp3 and wav since Windows 7 and many other audio types in 10. Just ask Windows:

    [VB6, Vista+] A compact function to retrieve any property by name, locally formatted

    Duration = GetPropertyDisplayString("C:\path\to\file.mp3", "System.Media.Duration")

    Returns it already formatted in hh:mm:ss

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    5,269

    Re: Demo Program I did for a radio engineer

    Quote Originally Posted by fafalone View Post
    Windows natively supports duration for mp3 and wav since Windows 7 and many other audio types in 10. Just ask Windows:

    [VB6, Vista+] A compact function to retrieve any property by name, locally formatted

    Duration = GetPropertyDisplayString("C:\path\to\file.mp3", "System.Media.Duration")

    Returns it already formatted in hh:mm:ss
    Very nice, faf.
    Kudos.
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2025
    Posts
    7

    Re: Demo Program I did for a radio engineer

    Quote Originally Posted by fafalone View Post
    Windows natively supports duration for mp3 and wav since Windows 7 and many other audio types in 10. Just ask Windows:

    [VB6, Vista+] A compact function to retrieve any property by name, locally formatted

    Duration = GetPropertyDisplayString("C:\path\to\file.mp3", "System.Media.Duration")

    Returns it already formatted in hh:mm:ss
    I was aware of that function, but from what I understand it puts quite a burden on the cpu and should only be use minimally.
    I don't know if that is true or not, but it was trivial to grab and then computation was easy; divide by 60 then mod by 60. don't think there are many songs or commercials on the radio that exceed that.

    Jack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width