title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Reading Length

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaklithn

    • Mar 2008
    • 9

    Reading Length

    I would like to read the song length from the file.
    The file is created with LAME MP3 ABR or VBR and the length can therefore not be calculated from bitrate and size.

    In the documentation page http://www.dbpoweramp.com/developer-scripting-dmc.htm
    I read the following description:

    [COLOR="Teal"]Read Audio Properties from File: .AudioProperties ([in] BSTR File, [out, retval] BSTR *OutProps )
    File: Source filename.
    Returns a string containing audio properties.
    [/COLOR]

    How can I specify "OutProps"?
    What values can be used?
    When I reference the dll in VB.Net the .AudioProperties just take ONE parameter.
  • Spoon
    Administrator
    • Apr 2002
    • 44505

    #2
    Re: Reading Length

    Is there a VB example of how to use it on that page?
    Spoon
    www.dbpoweramp.com

    Comment

    • jaklithn

      • Mar 2008
      • 9

      #3
      Re: Reading Length

      Originally posted by Spoon
      Is there a VB example of how to use it on that page?
      Yes, as you probably noticed there are examples for C++, C#, VB.Net and VBScript. But there are minor differences in the examples.
      The C++ example is the only one that makes use of the documented signature for AudioProperties that takes two parameters.
      Does that mean the implementation for the other languages hides part of the functionality?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44505

        #4
        Re: Reading Length

        Yes they return the value on the call.
        Spoon
        www.dbpoweramp.com

        Comment

        • jaklithn

          • Mar 2008
          • 9

          #5
          Re: Reading Length

          Originally posted by Spoon
          Yes they return the value on the call.
          Your answer is a bit short ....
          Are you trying to say they return the same result but in different ways, return value respectively out parameter?

          If so, I need to go back to my initial question: Is it possible to somehow return the length in seconds without trying to parse the long string returned from this property?

          I mean internally there must be a function to calculate the length but it is a pity if it only can be reached in a compiled multistring result ....

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44505

            #6
            Re: Reading Length

            Only via the string. Another option is to use the [audio info] utility codec (in beta) and export to an excel table of all your files in one go.
            Spoon
            www.dbpoweramp.com

            Comment

            • jaklithn

              • Mar 2008
              • 9

              #7
              Re: Reading Length

              Originally posted by Spoon
              Only via the string. Another option is to use the [audio info] utility codec (in beta) and export to an excel table of all your files in one go.
              OK, I already did the string parser

              Comment

              Working...

              ]]>