DSDM_UNLOCK
This message releases a block of sound data to the driver. The driver should perform whatever actions are necessary to output the audio data to the sound device.
typedef struct {
DWORD dwMsg;
DWORD dwInstance;
LPVOID pBuffer1;
DWORD dwCount1;
LPVOID pBuffer2;
DWORD dwCount2;
} DSDM_UNLOCK;
Members
- dwMsg
Equals DSDM_UNLOCK. - dwInstance
DirectSoundBuffer instance data. - pBuffer1
Pointer to the beginning of the first audio block. - dwCount1
The number of bytes written to pvAudio1. - pBuffer2
Pointer to the beginning of the second audio block. - dwCount2
The number of bytes written to pvAudio2.
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. |
Remarks
The data block is actually described by two pointers; both are required because sound buffers are circular. If the locked bytes do not wrap around the end of the buffer, the second pointer is NULL. However, if the bytes do wrap around, then the second pointer points to the beginning of the buffer.
Each call to DSDM_UNLOCK is preceded by a corresponding call to DSDM_LOCK. The pointer parameters are always the same pointers as those returned by DSDM_LOCK. However, the number of bytes unlocked could be less than the number of bytes locked if the application does not fill the locked region. See DSDM_LOCK for more details.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Dsdriver.h.
See Also
DSDM_LOCK | DirectSound Driver Messages
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.