Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- counter_t increment=42;
- counter_t threshold=9001;
- counter_t counter=0;
- sample_t curSample=0;
- sample_t dropDoubleInterpolateNextSample() {
- counter+=increment;
- while(counter>threshold) {
- counter-=threshold;
- curSample=readNextSample();
- }
- return curSample;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement