Copyright © 2008-2015 MultiMedia Soft

GetSoundFileDuration method

Previous pageReturn to chapter overviewNext page

Remarks

 

Returns the duration of the given sound file without the need to load the sound file itself in memory.

Accepted formats are the same of the LoadSound method.

 

 

Syntax

 

[Visual Basic]

Public Function GetSoundFileDuration (

strFileName as String

) as Int32


 

[C#]

public Int32 GetSoundFileDuration (

string strFileName

);


 

[C++]

public: Int32 GetSoundFileDuration (

string strFileName

);


 

 

 

Parameter

Description

 

 

strPathname

String containing the absolute pathname of the song file to check.

 

 

 

Return value

 

Value

Meaning

 

 

Value > 0

Duration expressed in milliseconds

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.