You also can have a look at the "winmm.dll". With the functions "waveOutPrepareHeader" and "waveOutWrite" you can send your created sound to the soundcard.