Previous | Next |
The SetPlayOffset method assigns the offset into a playable object, in relevant units, at which audio rendering can begin.
Syntax
HRESULT SetPlayOffset(
DWORD dwOffset
);
Parameters
dwOffset
[in] Double word containing the play offset in relevant units.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
E_INVALIDTYPE | The object with which this interface is associated is not a playable file or folder. |
WMDM_E_NOTSUPPORTED | This device does not support setting play lengths. |
E_FAIL | An unspecified error occurred. |
Remarks
If the value passed is greater than the total object length, dwOffset is clipped to the length of the object minus the current play length.
For playable files, the value returned is specified in milliseconds. The play offset does not change when the user presses Play on the media device, or when an application invokes the IWMDMDeviceControl::Play method.
For folders or file systems containing playable files, the value returned is in tracks, meaning that dwOffset indicates the first track to be played when an application invokes the IWMDMDeviceControl::Play method.
See Also
Previous | Next |