The IDirectSoundCaptureBuffer::SetNotificationPositions 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
);
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 |
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.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dsound.h.
Import Library: Use dsound.lib.