(almost) One loop to rule all the samples

Avoid looping over and over the samples. One
This commit is contained in:
Geoffrey Merck 2020-04-21 20:38:02 +02:00
parent 87c3b57ae4
commit 8d340cbfba
9 changed files with 78 additions and 43 deletions

View file

@ -125,3 +125,12 @@ void CFMCTCSSTX::getAudio(q15_t* samples, uint8_t length)
m_n = 0U;
}
}
q15_t CFMCTCSSTX::getAudio(q15_t sample)
{
sample += m_values[m_n++];
if(m_n >= m_length)
m_n = 0U;
return sample;
}