MultiMedia Soft forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Author Topic: GetSoundFileDuration seems allway return -6  (Read 262 times)

Terry

  • Newbie
  • *
  • Posts: 23
    • View Profile
GetSoundFileDuration seems allway return -6
« on: November 27, 2019, 05:22:05 AM »

Hello

"GetSoundFileDuration" seems allway return -6

The parameter "strFileName" is a playable audio file name.

GetControlVersion = "10.2.1.0"
GetEngineVersion = "13.1.1.9"

Terry
Thank you.
Logged

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 291
    • View Profile
    • MultiMedia Soft
Re: GetSoundFileDuration seems allway return -6
« Reply #1 on: November 27, 2019, 09:21:40 AM »

Hello,

we have just tested the mentioned method but we cannot reproduce the issue: do you have something we could use for testing so we could test in your exact same conditions?

Kind Regards

Severino Delaurenti
MultiMedia Soft
Logged

Terry

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: GetSoundFileDuration seems allway return -6
« Reply #2 on: November 27, 2019, 09:54:12 AM »

Hello

Module Module1

    Public Sub Main(ByVal CmdArgs() As String)
        Dim objp As New AudioDjStudioApi.AudioDjStudioApiObj
        Console.WriteLine(objp.GetSoundFileDuration(CmdArgs(0)))
        objp.Dispose()

    End Sub

End Module
Reference AudioDjStudioApiF4

Am I misunderstood the method?

Kind Regards

Terry

Logged

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 291
    • View Profile
    • MultiMedia Soft
Re: GetSoundFileDuration seems allway return -6
« Reply #3 on: November 27, 2019, 05:35:09 PM »

Hello,

you are simply missing to initialize the API: simply add the following call

 objp.InitSoundSystem(1, 0, 0, 0, 0)

before invoking the GetSoundFileDuration method and all should work as expected.

Kind Regards

Severino Delaurenti
MultiMedia Soft
Logged