From 86c6dc861f8dcd540be9c4cc35c834f8a15e6210 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 4 Feb 2023 02:36:48 +0100 Subject: [PATCH] DSD demod: disable audio for YSF wide mode if AMBE feature is active. Fixes #1587 --- plugins/channelrx/demoddsd/dsddemodsink.cpp | 12 ++++++++++-- plugins/channelrx/demoddsd/dsddemodsink.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demoddsd/dsddemodsink.cpp b/plugins/channelrx/demoddsd/dsddemodsink.cpp index 5b2f9e164..3a43e6583 100644 --- a/plugins/channelrx/demoddsd/dsddemodsink.cpp +++ b/plugins/channelrx/demoddsd/dsddemodsink.cpp @@ -232,8 +232,7 @@ void DSDDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV m_scopeSampleBuffer.push_back(s); } - // if (DSPEngine::instance()->hasDVSerialSupport()) - if (m_ambeFeature) + if (m_ambeFeature && isNotYSFWide()) { if ((m_settings.m_slot1On) && m_dsdDecoder.mbeDVReady1()) { @@ -471,6 +470,15 @@ const char *DSDDemodSink::updateAndGetStatusText() return m_formatStatusText; } +bool DSDDemodSink::isNotYSFWide() +{ + if (getDecoder().getSyncType() == DSDcc::DSDDecoder::DSDSyncYSF) { + return getDecoder().getYSFDecoder().getFICH().isNarrowMode(); + } + + return true; +} + void DSDDemodSink::formatStatusText() { switch (getDecoder().getSyncType()) diff --git a/plugins/channelrx/demoddsd/dsddemodsink.h b/plugins/channelrx/demoddsd/dsddemodsink.h index 5eaa7ec6a..a9dd2780b 100644 --- a/plugins/channelrx/demoddsd/dsddemodsink.h +++ b/plugins/channelrx/demoddsd/dsddemodsink.h @@ -158,6 +158,7 @@ private: PhaseDiscriminators m_phaseDiscri; void formatStatusText(); + bool isNotYSFWide(); }; #endif // INCLUDE_DSDDEMODSINK_H