Using Hardware Mixing

Most sound cards support some level of hardware mixing if there is a Microsoft DirectSound driver for the card.

The following tips will enable you to make the most of hardware mixing.

  • At run time, use the Device.Caps property to determine what formats are supported by the sound-accelerator hardware, and use only those formats if possible.
  • 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 hardware.
  • To force a buffer to be created in hardware, set the BufferDescription.LocateInHardware property. If you do this and resources for hardware mixing are not available, buffer creation will fail.
  • Use voice management to enable DirectSound to assign buffers to hardware resources when they are available, and to force termination of less important buffers in order to free hardware resources. See Dynamic Voice Management.