DSBCAPS_MUTE3DATMAXDISTANCE

const directsound.DSBCAPS_MUTE3DATMAXDISTANCE;

The sound is reduced to silence at the maximum distance. The buffer will stop playing when the maximum distance is exceeded, so that processor time is not wasted.