A one buffer error is noticeably out of sync, though.  This seems like a basic threading problem: we need to tell the engine thread to do something.  The usual pattern is to flip a semaphore or fill a command queue, the engine sees the semaphore or pops the command off the queue and performs the operation.  In this case, enginebuffer could ask bpmcontrol how far it needs to sync to get in phase.