I'm using the high performance counter for timing musical notes - and have run into a problem. It doesn't time them accurately. What should be a regular rhythm is irregular.
When I debug to find out what is happening, then the numbers returned by QueryPerformanceCounter(..) sometimes change direction - in this code below, if I put a break point on the
then it gets triggered.
As you see, I have requested that the thread runs on core 1 of dual core machine. I'm testing it on a laptop with two processors and two cores in each processor.
Is SetThreadAffinityMask(..) perhaps not enough to ensure that the thread runs on a single core? Or is there some other reason for it?
Is there any way to fix it so I can get sub-millisecond timing working accurately on any computer?
Thanks for your help.
static double ddwt_was;