My app plays audio and records it back, and I want to compinsate for this round trip delay. To figure out the delay, I played a sound on the left channel, recorded it on the right channel, exported the stereo wave file and looked at the difference between channels. It was 1238 samples.
I'm comparing that to the values I get from AudioIODevice::getInputLatencyInSamples() and AudioIODevice::getOutputLatencyInSamples() which both give me 1068.
From that I assume the round trip delay is 2136, which seems a lot higher than the 1238 the driver is reporting. That's a difference of about 20 ms. Or is the output delay the time from when the driver recieves the data to the time the block is finished playing? Therefore the time between giving the driver a block and the block starts playing is actually AudioIODevice::getOutputLatencyInSamples() - blockSize?
Is there something wrong in my assumptions or are driver delays not that accurate?