All pointers you need are in avars.h:

ENGINE_ void* pds; // pointer to the IDirectSound interface
ENGINE_ void* pdsb; // pointer to the primary IDirectSoundBuffer

Create a secondary 3D soundbuffer, fill it, and move it with the entity. This should be doable without much hassle.