Fix the timeout tones.

This commit is contained in:
Jonathan Naylor 2020-07-12 15:22:35 +01:00
parent f8d8f85841
commit ccdbe126e0
3 changed files with 7 additions and 7 deletions

View file

@ -36,7 +36,7 @@ m_n(0U)
void CFMTimeout::setParams(uint8_t level)
{
m_level = q15_t(level * 128);
m_level = q15_t(level * 5);
}
q15_t CFMTimeout::getAudio()
@ -45,9 +45,9 @@ q15_t CFMTimeout::getAudio()
if (!m_running)
return sample;
if (m_pos > 12000U) {
q31_t sample = BUSY_AUDIO[m_n] * m_level;
sample = q15_t(__SSAT((sample >> 15), 16));
if (m_pos >= 12000U) {
q31_t sample31 = BUSY_AUDIO[m_n] * m_level;
sample = q15_t(__SSAT((sample31 >> 15), 16));
m_n++;
if (m_n >= BUSY_AUDIO_LEN)