DSDM_SETNOTIFICATIONS

This message sets notification positions for the specified buffer. During playback, whenever the play cursor position reaches an offset specified in one of the DSBPOSITIONNOTIFY structures in the caller-supplied array, the associated event will be signaled.

typedef struct {
  DWORD dwMsg;
  DWORD dwInstance;
  DWORD dwCount;
  LPCDSBPOSITIONNOTIFY pDSNP;
} DSDMP_SET_NOTIFICATIONS;

Members

  • dwMsg
    Equals DSDM_SETNOTIFICATIONS.
  • dwInstance
    DirectSoundBuffer instance data.
  • dwCount
    Number of DSBPOSITIONNOTIFY structures pointed to by pDSNP.
  • pDSNP
    Pointer to an array of DSBPOSITIONNOTIFY structures. This array must be sorted in ascending order.

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_OUTOFMEMORY Not enough free memory is available to complete the operation.

Remarks

If the value DSBPN_OFFSETSTOP is specified in the dwOffset member, the associated event must be set when the DSDM_STOP message is received or when the end of the buffer has been reached and the playback is not looping. When used, this is the last item in the position-notify array.

If the buffer is playing at the time this message is received, the driver returns DSERR_INVALIDCALL.

If a position-notify array has already been set, this message will replace the previous position-notify array. If dwCount is set to zero or pDSNP is NULL, the driver must remove any previously set notifications for the buffer.

Requirements

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

See Also

DSBPOSITIONNOTIFY | DirectSound Driver Messages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.