Skip to content

Instantly share code, notes, and snippets.

@cvonk
Created May 9, 2022 22:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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