As I experience audio stuttering from buffer underruns (even with a next to nothing sweeped sine wave), I checked the DS impl. How come there are so many sleep(1)'s ? That is most probably what causes the hickups (f.i. when minimizing/maximizing the application window).
It looks like the impl is polled instead of using the IDirectSoundNotify interface which would let the juce impl just sit and wait on an event when it’s time to fill up the buffers? I’m starting such an effort but just wanted to went the idea here before I do. Any objections?