Copyright © 2001-2018 MultiMedia Soft

SoundDurationStringGet 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.

 

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

 

 

Syntax

 

[Visual Basic]

control.SoundDurationStringGet (

nPlayer as Integer,

bShowHour as enumBoolean,

bShowMs as enumBoolean,

strHourSeparator as String,

strMsSeparator as String,

nNumberOfMsDigits as Integer,

bKeepCountOfRateChange as enumBoolean,

) as String


 

[C++]

LPCTSTR control.SoundDurationStringGet (

short nPlayer,

short bShowHour,

short bShowMs,

BSTR strHourSeparator,

BSTR strMsSeparator,

short nNumberOfMsDigits,

short bKeepCountOfRateChange,

);


 

 

Parameter

Description

 

 

nPlayer

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

bShowHour

Boolean value that specifies the player to avoid displaying the 'hour' position field.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't show hour value

BOOL_TRUE

1

Shows hour value

bShowMs

Boolean value that specifies the player to avoid displaying the 'milliseconds' position field.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't show milliseconds value

BOOL_TRUE

1

Shows milliseconds value

strHourSeparator

Character used to separate hours, minutes and seconds, typically this should be set to ":"

strMsSeparator

Character used to separate seconds and milliseconds, typically this should be set to "."

nNumberOfMsDigits

Number of characters used to represent milliseconds digits, can be in the range from 1 to 3; values outside this range will be automatically set to 3.

bKeepCountOfRateChange

Boolean flag that specifies if the returned position must keep count of eventual playback rate changes set through previous calls to the Effects.PlaybackTempoSet or Effects.PlaybackRateSet methods.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't keep count of playback rate changes

BOOL_TRUE

1

Keeps count of playback rate changes

 

 

Return value

 

Value

Meaning

 

 

Empty string

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

Valid string

The formatted song duration