sndPlaySound() may be phased out. Use PlaySound instead.
If you already have the waveform in memory, then look
at the waveOutWrite() function (and the whole series
of related waveOut.. functions.