IDirectSoundNotify::SetNotificationPositions
This method sets the notification positions. During capture or playback, whenever the position reaches an offset specified in one of the DSBPOSITIONNOTIFY structures in the caller-supplied array, the associated event will be signaled. The position tracked in playback is the current play position; in capture it is the current read position.
HRESULT SetNotificationPositions(
DWORD cPositionNotifies,
LPCDSBPOSITIONNOTIFY lpcPositionNotifies
);
Parameters
- cPositionNotifies
Number of DSBPOSITIONNOTIFY structures. - lpcPositionNotifies
Pointer to an array of DSBPOSITIONNOTIFY structures. This array must be sorted in ascending order. This is true for both capture and playback.
Return Values
If the method succeeds, the return value is DS_OK.
If the method fails, the return value may be one of the following error values:
DSERR_INVALIDPARAM |
DSERR_OUTOFMEMORY |
Remarks
The value DSBPN_OFFSETSTOP can be specified in the dwOffset member to tell DirectSound to signal the associated event when the IDirectSoundBuffer::Stop or IDirectSoundCaptureBuffer::Stop method is called or when the end of the buffer has been reached and the playback is not looping. If it is used, this should be the last item in the position-notify array.
If a position-notify array has already been set, calling this function again will replace the previous position-notify array.
The buffer must be stopped when this method is called.
To clear all previously set notifications, set cPositionNotifies to 0 and lpcPositionNotifies to NULL.
Requirements
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header: Dsound.h.
Link Library: Dsound.lib.
See Also
IDirectSoundBuffer::Stop | IDirectSoundCaptureBuffer::Stop | DSBPOSITIONNOTIFY
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.