From c8ac9fbf05e6857865e67cf0d4b5f16f74b96e97 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 19 Nov 2017 19:33:20 +0100 Subject: [PATCH] Web API: report Tx channel info summary (2) --- plugins/channeltx/modam/ammod.cpp | 2 ++ plugins/channeltx/modatv/atvmod.cpp | 2 ++ plugins/channeltx/modnfm/nfmmod.cpp | 2 ++ plugins/channeltx/modssb/ssbmod.cpp | 2 ++ plugins/channeltx/modwfm/wfmmod.cpp | 2 ++ plugins/channeltx/udpsink/udpsink.cpp | 2 ++ 6 files changed, 12 insertions(+) diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index c921260bc..0e6a63679 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -74,12 +74,14 @@ AMMod::AMMod(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); } AMMod::~AMMod() { + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer; diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 488030e3f..dc50d6df2 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -92,6 +92,7 @@ ATVMod::ATVMod(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); // does applyStandard() too; } @@ -100,6 +101,7 @@ ATVMod::~ATVMod() { if (m_video.isOpened()) m_video.release(); releaseCameras(); + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer; diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index e13cabe27..0ffe43673 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -79,6 +79,7 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); } @@ -86,6 +87,7 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : NFMMod::~NFMMod() { DSPEngine::instance()->removeAudioSource(&m_audioFifo); + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer; diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 6ec3d0cdd..e1f8d11aa 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -98,6 +98,7 @@ SSBMod::SSBMod(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); } @@ -122,6 +123,7 @@ SSBMod::~SSBMod() DSPEngine::instance()->removeAudioSource(&m_audioFifo); + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer; diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 46f628f98..ed60be4be 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -85,6 +85,7 @@ WFMMod::WFMMod(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); } @@ -94,6 +95,7 @@ WFMMod::~WFMMod() delete m_rfFilter; delete[] m_rfFilterBuffer; DSPEngine::instance()->removeAudioSource(&m_audioFifo); + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer; diff --git a/plugins/channeltx/udpsink/udpsink.cpp b/plugins/channeltx/udpsink/udpsink.cpp index a04cd307d..8e2b7a167 100644 --- a/plugins/channeltx/udpsink/udpsink.cpp +++ b/plugins/channeltx/udpsink/udpsink.cpp @@ -64,6 +64,7 @@ UDPSink::UDPSink(DeviceSinkAPI *deviceAPI) : m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); m_deviceAPI->addThreadedSource(m_threadedChannelizer); + m_deviceAPI->addChannelAPI(this); applySettings(m_settings, true); } @@ -72,6 +73,7 @@ UDPSink::~UDPSink() { delete[] m_SSBFilterBuffer; delete m_SSBFilter; + m_deviceAPI->removeChannelAPI(this); m_deviceAPI->removeThreadedSource(m_threadedChannelizer); delete m_threadedChannelizer; delete m_channelizer;