TDirectSound
procedure Compact;
The compact method moves the unused portions of on-board sound memory, if any, to a contiguous block so that the largest portion of free memory will be available.
See IDirectSound::Compact for more information.