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.
Most sound cards support some level of hardware mixing if there
is a DirectSound driver for the card. The following tips will allow
you to make the most of hardware mixing:
Use static buffers for sounds that you want to be mixed in
hardware. DirectSound will attempt to use hardware mixing on static
Create sound buffers first for the sounds you use the most.
There is a limit to the number of buffers that can be mixed by
At run time, use the
IDirectSound::GetCapsmethod to determine what formats are
supported by the sound-accelerator hardware and use only those
formats if possible.
To create a static buffer, specify the DSBCAPS_STATIC flag in
dwFlagsmember of the
when you create a secondary buffer. You can also specify the
DSBCAPS_LOCHARDWARE flag to force hardware mixing for a buffer,
however, if you do this and resources for hardware mixing are not
IDirectSound::CreateSoundBuffermethod will fail.