h4yn0nnym0u5e
Well-known member
Answer ... after a couple of years ... for me ... not very well! Re-opening this thread because of this one, where all seems to be going pretty well apart from a very occasional glitch. I've tried to adapt the above approach slightly (because I'm also trying out different sample rates so magic numbers related to 44.1kHz aren't quite sufficient), but either (a) I don't fully understand what's going on, or (b) I do understand it, a bit, and it's Not Quite Right.Even a bit better, good enough control of buffer level that the amount of buffering could be reduced for less latency.
Code:if (diff > 0) feedback_accumulator = 44.2 * (1<<24); // fast else if (diff < 0) feedback_accumulator = 44.0 * (1<<24); // slow else feedback_accumulator = 44.1 * (1<<24); // nominal
But the question is how does this perform on PCs and Macs.
I can't for the life of me see how the feedback accumulator is being sent to the PC (Windows 10 x64, in my case); there's a single call to sync_event(), then as far as I can tell (and I've instrumented the function, I think), it never gets called again, so it really should make no difference whether feedback_accumulator has a sensible value in it.
The other thing is that the above code is only called for input audio (PC->Teensy), so I can't see how / if sync can be maintained in an output-only (Teensy->PC) situation.
Have I missed something with either or both of the above points? Entirely likely, but can some kindly soul tell me what it is, please?!