Microsoft Windows CE 3.0  

IDsDriverBuffer::Play

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The IDsDriverBuffer::Playmethod causes the sound buffer to start playing from the current position.

HRESULT Play(
DWORD
dwReserved1
,
DWORD
dwReserved2
,
DWORD
dwFlags
);

Parameters

dwReserved1
This parameter is reserved for future use, and must not be used or accessed for this release.
dwReserved2
This parameter is reserved for future use, and must not be used or accessed for this release.
dwFlags
Indicates how to play the buffer.
DSBPLAY_LOOPING
Play indefinitely, looping back to the beginning of the buffer when the end is reached. If this flag is not specified, the buffer stops playing when it reaches the end of the buffer memory.

Return Values

Returns DS_OK if successful, or one of the following error values otherwise:

  • DSERR_INVALIDCALL
  • DSERR_INVALIDPARAM
  • DSERR_BUFFERLOST

    Remarks

    The application is responsible for creating sound data that has the proper ramping effects before the sound buffer is started. If the sound buffer was created with the DSBCAPS_PRIMARYBUFFER flag, this method causes the primary sound buffer to start playing to the sound device. Otherwise, this method causes the sound buffer to be mixed into the primary sound buffer which is then output to the sound device.

    If this method is called on a buffer that is already playing, the driver should succeed the call. If the dwFlagsparameter specifies different flags than that specified in the original call, the driver should modify the behavior of this buffer to reflect the new flags.

    If the DSBPLAY_LOOPING flag is not specified, the driver must ensure that the buffer stops playing when the play cursor reaches the end. When this happens, the driver should reset the current position to zero (that is, if IDsDriverBuffer::Playis called subsequently, the buffer should begin playing from the beginning of the buffer).



     Last updated on Tuesday, July 13, 2004

    © 2004 Microsoft Corporation. All rights reserved.