Microsoft DirectX 9.0 |
The SetNotificationPositions method sets the notification positions. During capture or playback, whenever the read or play cursor reaches one of the specified offsets, the associated event is signaled.
Syntax
HRESULT SetNotificationPositions(
DWORD dwPositionNotifies,
LPCDSBPOSITIONNOTIFY pcPositionNotifies
);
Parameters
dwPositionNotifies
Number of DSBPOSITIONNOTIFY structures.
pcPositionNotifies
Pointer to an array of DSBPOSITIONNOTIFY structures.
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:
Return code |
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 IDirectSoundBuffer8::Stop or IDirectSoundCaptureBuffer8::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, the method replaces the previous array.
The buffer must be stopped when this method is called.
Requirements
Header: Declared in dsound.h.
See Also