1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

ATV Modulator: use interpolated sample rate for SSB/DSB filters

This commit is contained in:
f4exb 2017-03-17 19:56:35 +01:00
parent 2018607944
commit 529e2c2c27

View File

@ -650,7 +650,7 @@ void ATVMod::apply(bool force)
m_tvSampleRate = m_config.m_outputSampleRate;
}
m_SSBFilter->create_filter(0, m_config.m_rfBandwidth / m_config.m_outputSampleRate);
m_SSBFilter->create_filter(0, m_config.m_rfBandwidth / m_tvSampleRate);
memset(m_SSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen>>1));
m_SSBFilterBufferIndex = 0;
@ -660,11 +660,12 @@ void ATVMod::apply(bool force)
if ((m_config.m_outputSampleRate != m_running.m_outputSampleRate) ||
(m_config.m_rfOppBandwidth != m_running.m_rfOppBandwidth) ||
(m_config.m_rfBandwidth != m_running.m_rfBandwidth) || force)
(m_config.m_rfBandwidth != m_running.m_rfBandwidth) ||
(m_config.m_atvStd != m_running.m_atvStd) || force) // difference in TV standard may have changed TV sample rate
{
m_settingsMutex.lock();
m_DSBFilter->create_asym_filter(m_config.m_rfOppBandwidth / m_config.m_outputSampleRate, m_config.m_rfBandwidth / m_config.m_outputSampleRate);
m_DSBFilter->create_asym_filter(m_config.m_rfOppBandwidth / m_tvSampleRate, m_config.m_rfBandwidth / m_tvSampleRate);
memset(m_DSBFilterBuffer, 0, sizeof(Complex)*(m_ssbFftLen));
m_DSBFilterBufferIndex = 0;
@ -672,7 +673,7 @@ void ATVMod::apply(bool force)
}
if ((m_config.m_inputFrequencyOffset != m_running.m_inputFrequencyOffset) ||
(m_config.m_outputSampleRate != m_running.m_outputSampleRate))
(m_config.m_outputSampleRate != m_running.m_outputSampleRate) || force)
{
m_settingsMutex.lock();
m_carrierNco.setFreq(m_config.m_inputFrequencyOffset, m_config.m_outputSampleRate);