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. |
When creating a sound buffer, your application must specify the control options needed for that buffer. This is done with the dwFlagsmember of the DSBUFFERDESCstructure, which can contain one or more DSBCAPS_CTRL* flags. The following controls are available:
To obtain the best performance on all sound cards, your application should specify only control options it will use.
DirectSound uses the control options in determining whether hardware resources can be allocated to sound buffers. For example, a device might support hardware buffers but provide no pan control on those buffers. In this case, DirectSound would use hardware acceleration only if the DSBCAPS_CTRLPAN flag was not specified.
If your application attempts to use a control that a buffer lacks, the method call fails. For example, if you attempt to change the volume by using the IDirectSoundBuffer::SetVolumemethod, the method can succeed only if the DSBCAPS_CTRLVOLUME flag was specified when the buffer was created. Otherwise the method fails and returns the DSERR_CONTROLUNAVAILerror code.
Last updated on Tuesday, May 18, 2004