Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Setting the Time Format

Use the MCI_SET command message along with the MCI_SET_PARMS structure to set the time format for an open device. Set the dwTimeFormat member to one of the following constants.

Constant Time format
MCI_FORMAT_BYTESBytes (in pulse code modulated [PCM] format files)
MCI_FORMAT_MILLISECONDSMilliseconds
MCI_FORMAT_MSFMinute/second/frame
MCI_FORMAT_SAMPLESSamples
MCI_FORMAT_SMPTE_24SMPTE, 24 frame
MCI_FORMAT_SMPTE_25SMPTE, 25 frame
MCI_FORMAT_SMPTE_30SMPTE, 30 frame
MCI_FORMAT_SMPTE_30DROPSMPTE, 30 frame drop
MCI_FORMAT_TMSFTrack/minute/second/frame
MCI_SEQ_FORMAT_SONGPTRMIDI song pointer

 

The following example sets the time format to milliseconds on the device specified by the wDeviceID variable using the mciSendCommand function.



UINT wDeviceID; 
MCI_SET_PARMS mciSetParms; 

// Set time format to milliseconds. 

mciSetParms.dwTimeFormat = MCI_FORMAT_MILLISECONDS; 
if( mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, 
                  (DWORD) &mciSetParms)) 
{
    // Error, unable to set time format. 
    return FALSE; 
}
else 
{
    // Time format set successfully. 
    return TRUE; 
}


 

 

Community Additions

Show:
© 2015 Microsoft