GetSoundFileDuration seems allway return -6

Started by Terry, November 27, 2019, 05:22:05 AM

Previous topic - Next topic

Terry

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.

Administrator

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

Terry

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


Administrator

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