SHORT: I have a method called 44,100 times per second. I would like to know what to do in a situation where I need the sound to be marked when the method 13781.25th is called - this is 192 bits per minute). I have the opportunity to round this number and make the sound tick by calling the method 13781st, which would mean that I make the sound at 0.25 too soon. this means that it will be 0.00000566893424 seconds too soon.
after 100 ticks I'm sure that the delay will certainly add up. Is there some kind of smart work around that tracks the delay, and when the delay comes at a certain point, or maybe + plusmn; some numbers to continue the bit again?
Here is my code below.
int counter;
source share