MMRESULT waveOutGetPosition(hWaveOut, lpInfo, wSize) | |||
HWAVEOUT hWaveOut; | |||
LPMMTIME lpInfo; | |||
UINT wSize; |
The waveOutGetPosition function retrieves the current playback position of the specified waveform output device.
hWaveOut
Specifies a handle to the waveform output device.
lpInfo
Specifies a far pointer to an MMTIME structure.
wSize
Specifies the size of the MMTIME structure.
Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:
Value | Meaning |
MMSYSERR_INVALHANDLE | Specified device handle is invalid. |
MMSYSERR_HANDLEBUSY | The handle hWaveOut is in use on another thread. |
Before calling waveOutGetPosition, set the wType field of the MMTIME structure to indicate the time format that you desire. After calling waveOutGetPosition, check the wType field to determine if the desired time format is supported. If the desired format is not supported, wType will specify an alternative format.
The position is set to zero when the device is opened or reset.