Jump to content
Gold Sponsor: Data-Way IT-Consulting, Austria

  • PBXScript.GetAudioFileLength()

    PBXScript.GetAudioFileLength()

    Lua   → VBScript   SwxWare v13.10

     

    This function returns the length of a given .wav file in seconds.

     

    local nLength = PBXScript.GetAudioFileLength(sFileName)

     

    This function returns a number value.

     

    If 0 is returned, the file length is 0 or length could not be determined, e.g. because of an unsupported file format. SwyxWare requires .wav files in 16kHz, 16bit, mono format.

     

     

    local nLength = PBXScript.GetAudioFileLength("Welcome.wav")

     

    If no explicit path is given in sFileName, SwyxServer searches this file in the database, in the following scopes in that order:

     

    1. User
    2. User Default
    3. Global
    4. System Default

     

     

    local nLength = PBXScript.GetAudioFileLength("C:\Announcements\Welcome.wav")

     

    It is also possible to use a local file from the SwyxServer machine. In this case it is necessary, that the Windows user account the SwyxServer service is running under (usually the SwyxServiceAccount), has read privileges on that file.

     

     


    Tom Wellige
     Share


     Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.