There have been problems with certain soundcard drivers misreporting the buffer. M-audio Delta driver versions .26 and .27 did this. The effect was for a 12ms buffer to produce new recordings that were >12ms behind the existing ones.
The workaround is to select the lowest buffer value (say 64 samples), re-profile the card and turn the latency slider up to suit performance. The record lag is then only the 64 buffer amount (about 1.5ms @ 44.1Khz).
If you have a Cakewalk version that supports ASIO, this seems not to have the lag problem.
If the midi timimng always gets progressively worse during playback, there is a setting "Ignore Midi Timestamps" in, I think, the TTSseq.ini file that correct, but I think you would notice that in normal playback of the midi, not just the audio recordings.