Retrieving the Current Playback Position (Windows Embedded CE 6.0)

1/6/2010

Monitor the current playback position within the data block by using the waveOutGetPosition or waveInGetPosition function and the MMTIME structure. Use the MMTIME structure to represent time in one or more different formats, including milliseconds, samples, or the Society of Motion Picture and Television Engineers (SMPTE) time formats. The wType member specifies the format that is used to represent time.

To retrieve the current playback position

  1. Set the wType member in the MMTIME structure to the preferred time format.

  2. Call waveOutGetPosition or waveInGetPosition.

    While calling this function, pass the MMTIME structure in the pmmt parameter.

  3. Check the wType member after the call to see whether the requested time format is supported.

    If the device does not support the time format, the device driver specifies the time in an alternate time format and changes wType to the selected time format.

Most waveform audio devices support samples as the preferred time format. Thus, a waveform audio device usually describes its current position in a .wav file as the number of samples from the beginning of the waveform audio file.

See Also

Concepts

Playing Waveform Audio Files