Synchronizing PortAudio sound with GUI
I'm writing an application that uses PortAudio to generate sound. I need to synchronize certain GUI changes with the sound stream. The callback function receives a struct PaStreamCallbackTimeInfo that seems to have the timing information I need, but there's no documentation on what the various fields mean. Through experimentation, I've found that the currentTime field is the time that the callback was called (in retrospect, that seems pretty obvious), but what do the inputBufferAdcTime and outputBufferDacTime fields mean?
(Actually, PortAudio calls the callback fast enough that I could just use the currentTime to get the synchronization close enough, but still... it's the principle of the thing.)
|