That's actually pretty much exactly what I was doing (I called it double buffering because the circular buffer was in effect a secondary buffer). There were slight complications though -- usually that the API wanted audio in huge chunks (like 4 or 5 frames worth of audio at a time).
Since I'm regulating my framerate based on the rate of sound output (the only real way to ensure audio doesn't distort), my program went from thinking it was caught up (so it slept) to being 4 or 5 frames behind (so it scrambled to run those frames to produce the required audio). This resulted in very choppy gameplay. I worked around that though by having my circular buffer simulate a smooth emptying effect by returning false values based on elapsed time since the last API callback took samples. Worked out quite well. I have several audio wrappers I wrote all over my HD -- so audio output isn't really an issue for me. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

