A sync pulse represents the current stream sync master clock value and its stream handle (HSTREAM). The clock value is expressed in MMTIME units (1/3 milliseconds) where 0 represents the time the master stream was started from the beginning of its associated multimedia data object. If a seek operation is performed on the master, the stream must be stopped. The master stream time also stops when a seek takes place and is reset to the stream time of the seek point. When the stream is restarted, the stream time is restarted from the seek point. This means that stream time can be equated to position in the data as opposed to the amount of time the stream has been active.
Sync pulses are generated on a regular basis by the master. A slave receives sync pulses only when the Sync/Stream Manager determines that it is out of sync with the master. Sync pulses are distributed by the stream manager based on the programmed stream sync relationship. This distribution is effective for both DLL and device driver slave stream handlers.
Each slave stream handler must regularly update the sync pulse SYNC_EVCB with what it believes the stream time is. The Sync/Stream Manager checks this slave handler stream time against the master stream time and decides whether to send a sync pulse to this handler.
Device driver stream handlers receive sync pulses through their sync pulse event control block (SYNC_EVCB). A device driver stream handler must check for sync pulses from the Sync/Stream Manager by polling a flag in the sync pulse SYNC_EVCB. The Sync/Stream Manager sets the flag to indicate a sync pulse and updates the current master stream time. Usually, the device driver slave handler polls the flag once during interrupt processing and adjusts the stream consumption accordingly.
DLL stream handlers receive sync pulses in one of two ways. A DLL stream handler can register a semaphore with the Sync/Stream Manager, or it can use the same method the SSM uses for a device driver stream handler.