Copyright © 2008-2018 MultiMedia Soft

FromSamplesToFormattedTime method

Previous pageReturn to chapter overviewNext page

Remarks

 

Given an amount of time in samples retrieves a string containing the formatted time using the 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 "milliseconds". For example [04:34:200] indicates a time of 0 hours (the hours number is automatically omitted if 0), 4 minutes, 34 seconds and 200 milliseconds.

 

 

Syntax

 

[Visual Basic]

control.FromSamplesToFormattedTime (

nTimeInSamples as long,

bShowHour as enumBoolean,

bShowMs as enumBoolean

) as string


 

[C++]

LPCTSTR control.FromSamplesToFormattedTime (

long nTimeInSamples,

short bShowHour,

short bShowMs

);


 

 

Parameter

Description

 

 

nTimeInSamples

Time, expressed in samples, that needs to be converted to a formatted string

bShowHour

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

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

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

Doesn't show milliseconds value

BOOL_TRUE

1

Shows milliseconds value

 

 

Return value

 

Value

Meaning

 

 

Empty string

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

Valid string

The formatted time