DSDM_PLAY

This message causes the sound buffer to start playing from the current position.

typedef struct {
  DWORD dwMsg;
  DWORD dwInstance;
  DWORD dwFlags;
} DSDMP_PLAY;

Members

  • dwMsg
    Equals DSDM_PLAY.
  • dwInstance
    DirectSoundBuffer instance data.
  • dwFlags
    Indicates how to play the buffer. The status can be indicated by the DSBPLAY_LOOPING flag.
    Flag Description
    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.

Error value Description
DSERR_INVALIDCALL This call is not valid for the current state of this object.
DSERR_INVALIDPARAM An invalid parameter was passed to the returning function.
DSERR_BUFFERLOST The buffer memory has been lost and must be restored.

Remarks

The application is responsible for creating sound data that has the proper ramping effects before the sound buffer is started.

If this method is called on a buffer that is already playing, the driver should succeed the call. If the dwFlags member 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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Dsdriver.h.

See Also

DirectSound Driver Messages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.