Microsoft Windows CE 3.0  

IDsDriver::DuplicateSoundBuffer

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The IDsDriver::DuplicateSoundBuffermethod is called only when the device has been opened by DirectSound through a call to IDsDriver::Open. This method 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 *ppv.

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

HRESULT DuplicateSoundBuffer(
IDSDRIVERBUFFER
pIDsDriverBuffer
,
LPVOID *
ppv
);

Parameters

pIDsDriverBuffer
Pointer to the IDsDriverBuffer interfaceof the original sound buffer that is being duplicated.
ppv
Pointer to an interface pointer that receives the IDsDriverBufferinterface created by the driver. If no interface is created (that is, if the creation request fails), the driver should set the interface pointer to NULL.

Return Values

If called on a primary buffer, the driver should return DSERR_INVALIDCALL.

Returns DS_OK if successful, or one of the following error values otherwise: