Created
May 9, 2022 22:36
-
-
Save cvonk/4d690fa8a9057e7369e7ea082e01da29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static autoCorr_t | |
_auto_corr(samples_t const samples, samplesLag_t const lag) | |
{ | |
autoCorr_t ac = 0; | |
for (sample_cnt_t ii = 0; ii < CONFIG_MIDIMIKE_WINDOW_SIZE - lag; ii++) { | |
ac += ((int16_t)samples[ii] * samples[ii + lag]); | |
} | |
return ac; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment