mirror of https://github.com/g4klx/MMDVM.git
Simplify code
This commit is contained in:
parent
e91c4417cb
commit
5d45649096
14
FM.cpp
14
FM.cpp
|
@ -102,19 +102,19 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
|
||||||
}
|
}
|
||||||
|
|
||||||
q15_t currentSample = currentRFSample;
|
q15_t currentSample = currentRFSample;
|
||||||
if(m_state == FS_RELAYING_EXT || m_state == FS_KERCHUNK_EXT)
|
q15_t currentBoost = m_rfAudioBoost;
|
||||||
|
if(m_state == FS_RELAYING_EXT || m_state == FS_KERCHUNK_EXT){
|
||||||
currentSample = currentExtSample;
|
currentSample = currentExtSample;
|
||||||
|
currentBoost = m_extAudioBoost;
|
||||||
|
}
|
||||||
|
|
||||||
// Only let RF audio through when relaying RF audio
|
// Only let RF audio through when relaying RF audio
|
||||||
if (m_state == FS_RELAYING_RF || m_state == FS_KERCHUNK_RF) {
|
if (m_state == FS_RELAYING_RF || m_state == FS_KERCHUNK_RF || m_state == FS_RELAYING_EXT || m_state == FS_KERCHUNK_EXT) {
|
||||||
if (m_extEnabled)
|
if (m_extEnabled && (m_state == FS_RELAYING_RF || m_state == FS_KERCHUNK_RF))
|
||||||
m_downsampler.addSample(currentSample);
|
m_downsampler.addSample(currentSample);
|
||||||
|
|
||||||
currentSample = m_blanking.process(currentSample);
|
currentSample = m_blanking.process(currentSample);
|
||||||
currentSample *= m_rfAudioBoost;
|
currentSample *= currentBoost;
|
||||||
} else if (m_state == FS_RELAYING_EXT || m_state == FS_KERCHUNK_EXT) {
|
|
||||||
currentSample = m_blanking.process(currentSample);
|
|
||||||
currentSample *= m_extAudioBoost;
|
|
||||||
} else {
|
} else {
|
||||||
currentSample = 0;
|
currentSample = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue