Copyright © 2005-2011 MultiMedia Soft

GetFormattedSoundDuration method

Previous pageReturn to chapter overviewNext page

Remarks

 

Retrieves a string containing the formatted sound duration using the following format [hh:mm:ss:ms(3)] in which hh is for hours, mm is for minutes, ss is for seconds and ms(3) are three characters representing the milliseconds. For example [04:34:200] indicates a song during 0 hours (the hours number is automatically omitted if 0), 4 minutes, 34 seconds and 200 milliseconds.

 

This method keeps count of eventual tempo and/or playback rate changes so the reported duration may vary depending upon the current tempo and/or playback rate. If you should need retrieving the original duration of the loaded song you should use the GetFormattedSoundOriginalDuration method.

 

The song duration in milliseconds can be obtained using the GetSoundDuration method.

 

 

Syntax

 

[Visual Basic]

Public Function GetFormattedSoundDuration (

nPlayerIndex as Int16

) as String


 

[C#]

public string GetFormattedSoundDuration (

Int16 nPlayerIndex

);


 

[C++]

public: string GetFormattedSoundDuration (

Int16 nPlayerIndex

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player whose information must be retrieved

 

 

Return value

 

Value

Meaning

 

 

Empty string

An error occurred (see the LastError property for further error details)

Valid string

The formatted song duration