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
Return Values
Returns DS_OK if successful, or one of the following error values otherwise:
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