I've recently programmed a small game which is part of a program, nothing fancy (no DirectX and stuff), in which I use an API call to play sounds. I have this background loop (a wave file) which doesn't stop playing after I close the window, while I've let the program play (both loop AND normal) an empty wave file (about 2 secs of silence) on the unload event of the form.

------------------
Doomstar
http://come.to/Doomstar