Take a look at line 35 of source/snd_qf/snd_mix.c. There is (what appears to be) a portable C version of the S_WriteLinearBlastStereo16 function. Now to take a look at what guides the choices at compile time....