I suggest you try the PortAudio library. This is a lean cross-platform library that abstracts the audio output functionality.
It comes with a bunch of small examples. One of them plays a sine wave, while playing a bunch of sine waves. Since the examples already do 90% of what you need, you should have your sound and work in less than half an hour.
Hint: The best PortAudio documentation is in the header file!
Nils pipenbrinck
source share