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 IDsDriverBuffer::SetFormatmethod sets the format of the primary sound buffer to the format described in the WAVEFORMATEXstructure.
HRESULT SetFormat( LPWAVEFORMATEX pwfxToSet );
Parameters
Return Values
Returns DS_OK if successful, or one of the following error values otherwise:
Remarks
This method is only valid for primary sound buffers; DirectSound never calls this method for secondary buffers. DirectSound guarantees that this method is never called when the buffer is playing.
This call has two meanings. If the driver did not specify the DSDDESC_DOMMSYSTEMSETFORMAT flag, this call requests the driver to change the buffer's format to the specified format. However, if the driver specified the DSDDESC_DOMMSYSTEMSETFORMAT flag, this call notifies the driver that the format was just set through the Wave APIs. The driver may perform extra processing if necessary; in this case it should return DS_OK. If it does no processing, it should return DSERR_UNSUPPORTED.
Last updated on Tuesday, July 13, 2004