I would like to output an audio stream (asynchronously) in C++.
I have already looked here,here, and here but it is obsolete and the link is broken.
I am sure this is a simple task, yet I can't find anywhere on the web to do it. I prefer something neat and tidy, STL oriented (e.g. device I can write to like I am writing to the screeen?). As I am using VC2013, I can use windows precompiled headers but prefer to avoid it.
Thanks,
UPDATE:
I was trying to stay close to STL, but by the look of it, I can't, so I'll stick with windows API.
PlaySound is inappropriate because my data is not on file, it is in a buffer in he memory.
I have tried using waveOutWrite
but I would like to play two sound sequentially, i.e at t=0 start a sound for 2 sec, and at t=1 start a sound for 3 sec (overlap)