DSDM_DUPLICATEBUFFER

This message requests that the driver duplicate an existing sound buffer. This means that the two buffers should share sound buffer memory, but all other operations and parameters should be separate. Both buffers should be playable simultaneously with different play cursors. Different volume, pan, and frequency controls should be independently modifiable, although the initial settings should be the same as the original buffer. The driver should create a duplicate buffer object and return its interface pointer in pdwInstance.

typedef struct {
  DWORD dwMsg; 
  DWORD dwInstance; 
  PDWORD pdwInstance;
} DSDMP_DUPLICATEBUFFER;

Members

  • dwMsg
    Equals DSDM_CREATEBUFFER.
  • dwInstance
    DirectSoundBuffer instance data.
  • pdwInstance
    Pointer to the driver buffer instance data for new buffer.

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

If the driver is unable to create a duplicate buffer that uses the same memory, it should fail the call. It should not allocate a new hardware memory block and copy the data, nor should it attempt to emulate the buffer in software. DirectSound is responsible for these actions.

Requirements

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

See Also

DirectSound Driver Messages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.