mmSeekToTime

Sets all tracks in a multimedia file to a specific time during a play operation.

Prototype

DWORD mmSetSeekTime ( MMFile *pMMFile, unsigned int seekTime)

Argument

Description

pMMFile

A pointer to the object that controls the multimedia file.

seekTime

A specific track time within a file relative to the beginning of the file, specified in milliseconds.

Return values

Return value

Description

SUCCESS

 

MMERR_NO_SYNC_TABLE

File does not have a sync table.

MMERR_INVALID_FILE

pMMFile is NULL.

MMERR_INVALID_TIME

The seekTime is invalid. This error is returned if either of the following is true:

  • seekTime is greater than the last sync point time.

  • seekTime is less than the first sync point time.

Details

Use mmSeekToTime to seek to a specified time relative to the start of a file. The track pointer for all tracks is repositioned to the specified time. mmSeekToTime can be called only during a play operation. A seek operation can be performed when using partial buffer mode (not single buffer mode).

When the application calls mmSeekToTime on a time that does not match a sync point, the track pointer is repositioned to the next seek point’s time.

Example

DWORD ret;
ret = mmSeekToTime(&mmFile, seekTime);
If( ret != SUCCESS )
{
    printf ("\nERROR in mmSeekToTime (%d)\n", ret);
    return -1;
}