From 5e7fbec1cee7bcef0a4704192ccf6340b9539907 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 19 Apr 2021 11:42:01 +0200 Subject: [PATCH] DSD demod: request fixed 48000 S/s sample rate for the channel sample rate. Fixes #752 --- plugins/channelrx/demoddsd/dsddemodbaseband.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/channelrx/demoddsd/dsddemodbaseband.cpp b/plugins/channelrx/demoddsd/dsddemodbaseband.cpp index 233964100..97a5500bb 100644 --- a/plugins/channelrx/demoddsd/dsddemodbaseband.cpp +++ b/plugins/channelrx/demoddsd/dsddemodbaseband.cpp @@ -151,7 +151,7 @@ void DSDDemodBaseband::applySettings(const DSDDemodSettings& settings, bool forc { if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) { - m_channelizer->setChannelization(m_sink.getAudioSampleRate(), settings.m_inputFrequencyOffset); + m_channelizer->setChannelization(48000, settings.m_inputFrequencyOffset); m_sink.applyChannelSettings(m_channelizer->getChannelSampleRate(), m_channelizer->getChannelFrequencyOffset()); if (m_channelSampleRate != m_channelizer->getChannelSampleRate()) @@ -172,10 +172,7 @@ void DSDDemodBaseband::applySettings(const DSDDemodSettings& settings, bool forc audioDeviceManager->addAudioSink(m_sink.getAudioFifo2(), getInputMessageQueue(), audioDeviceIndex); int audioSampleRate = audioDeviceManager->getOutputSampleRate(audioDeviceIndex); - if (m_sink.getAudioSampleRate() != audioSampleRate) - { - m_channelizer->setChannelization(audioSampleRate, settings.m_inputFrequencyOffset); - m_sink.applyChannelSettings(m_channelizer->getChannelSampleRate(), m_channelizer->getChannelFrequencyOffset()); + if (m_sink.getAudioSampleRate() != audioSampleRate) { m_sink.applyAudioSampleRate(audioSampleRate); } }