Hardware trigger sound card output
You (probably) cannot do what you are trying to do.

Sound buffers have a certain amount of data in them.  Using the playback rate, we can measure this in time.  A common "real time" sound buffer duration would be, say, 5 ms.  Every 5 ms the CPU needs interrupted so it can generate the next 5 ms of data.

The problem you will run into is that the user presses play asynchronously to this hypothetical 5ms timer.  If you're really lucky, the user presses play just before the timer expires, and the sound begins to play "immediately".  If you're really unlucky, the user presses play just after the timer expires, and the sound will begin to play "5 ms after immediately".

Even if you knew exactly when the 5ms timer was going to fire, you can't make people press play synchronously with that timer.  You will always have a variable latency the size of 0 &lt;= x &lt;= sizeof(SoundBuffer)