mirror of https://github.com/g4klx/MMDVM.git
Only use the CTCSS delay when not using COS.
This commit is contained in:
parent
85acdc7121
commit
66ea3ad0d1
5
FM.cpp
5
FM.cpp
|
@ -70,9 +70,11 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
|
||||||
|
|
||||||
uint8_t ctcssState = m_ctcssRX.process(currentSample);
|
uint8_t ctcssState = m_ctcssRX.process(currentSample);
|
||||||
|
|
||||||
|
if (!m_useCOS) {
|
||||||
// Delay the audio by 100ms to better match the CTCSS detector output
|
// Delay the audio by 100ms to better match the CTCSS detector output
|
||||||
m_inputRB.put(currentSample);
|
m_inputRB.put(currentSample);
|
||||||
m_inputRB.get(currentSample);
|
m_inputRB.get(currentSample);
|
||||||
|
}
|
||||||
|
|
||||||
if (CTCSS_NOT_READY(ctcssState) && m_modemState != STATE_FM) {
|
if (CTCSS_NOT_READY(ctcssState) && m_modemState != STATE_FM) {
|
||||||
//Not enough samples to determine if you have CTCSS, just carry on
|
//Not enough samples to determine if you have CTCSS, just carry on
|
||||||
|
@ -130,10 +132,9 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
|
||||||
void CFM::process()
|
void CFM::process()
|
||||||
{
|
{
|
||||||
q15_t sample;
|
q15_t sample;
|
||||||
while(io.getSpace() >= 3U && m_outputRB.get(sample)) {
|
while(io.getSpace() >= 3U && m_outputRB.get(sample))
|
||||||
io.write(STATE_FM, &sample, 1U);
|
io.write(STATE_FM, &sample, 1U);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void CFM::reset()
|
void CFM::reset()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue