Skip to content

Commit

Permalink
Don't stop source if being deleted. For f4exb#2315. Send DSPSignalNot…
Browse files Browse the repository at this point in the history
…ification in audio mods for f4exb#2336.
  • Loading branch information
srcejon committed Nov 25, 2024
1 parent d0cae88 commit a91fa3b
Show file tree
Hide file tree
Showing 73 changed files with 228 additions and 166 deletions.
4 changes: 2 additions & 2 deletions plugins/channelrx/chanalyzer/chanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ChannelAnalyzer::~ChannelAnalyzer()
delete m_networkManager;

m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -103,7 +103,7 @@ void ChannelAnalyzer::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/channelpower/channelpower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ChannelPower::~ChannelPower()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -98,7 +98,7 @@ void ChannelPower::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodadsb/adsbdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ADSBDemod::~ADSBDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
delete m_basebandSink; // This results in a call to ADSBDemod::stop(), so need to delete before worker and thread
delete m_worker;
delete m_thread;
Expand All @@ -115,7 +115,7 @@ void ADSBDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodais/aisdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ AISDemod::~AISDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -99,7 +99,7 @@ void AISDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodam/amdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ AMDemod::~AMDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
stop();
}

Expand All @@ -100,7 +100,7 @@ void AMDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodapt/aptdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ APTDemod::~APTDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_imageWorker->isRunning()) {
stopImageWorker();
Expand All @@ -115,7 +115,7 @@ void APTDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodatv/atvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ATVDemod::~ATVDemod()
{
qDebug("ATVDemod::~ATVDemod");
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -81,7 +81,7 @@ void ATVDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodbfm/bfmdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ BFMDemod::~BFMDemod()
delete m_networkManager;

m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
stop();
}

Expand All @@ -98,7 +98,7 @@ void BFMDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodchirpchat/chirpchatdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ChirpChatDemod::~ChirpChatDemod()
{
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
stop();
}

Expand All @@ -106,7 +106,7 @@ void ChirpChatDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demoddab/dabdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ DABDemod::~DABDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -114,7 +114,7 @@ void DABDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demoddatv/datvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ DATVDemod::~DATVDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -98,7 +98,7 @@ void DATVDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demoddsc/dscdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ DSCDemod::~DSCDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -103,7 +103,7 @@ void DSCDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demoddsd/dsddemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ DSDDemod::~DSDDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

stop();
}
Expand All @@ -123,7 +123,7 @@ void DSDDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodendoftrain/endoftraindemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ EndOfTrainDemod::~EndOfTrainDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -98,7 +98,7 @@ void EndOfTrainDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodfreedv/freedvdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ FreeDVDemod::~FreeDVDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
delete m_basebandSink;
delete m_thread;
}
Expand All @@ -98,7 +98,7 @@ void FreeDVDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodft8/ft8demod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ FT8Demod::~FT8Demod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

stop();
}
Expand All @@ -104,7 +104,7 @@ void FT8Demod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodils/ilsdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ILSDemod::~ILSDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -111,7 +111,7 @@ void ILSDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodm17/m17demod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ M17Demod::~M17Demod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);
stop();
}

Expand All @@ -103,7 +103,7 @@ void M17Demod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodnavtex/navtexdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ NavtexDemod::~NavtexDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -103,7 +103,7 @@ void NavtexDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodnfm/nfmdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ NFMDemod::~NFMDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

stop();
}
Expand All @@ -100,7 +100,7 @@ void NFMDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodpacket/packetdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PacketDemod::~PacketDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -102,7 +102,7 @@ void PacketDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
4 changes: 2 additions & 2 deletions plugins/channelrx/demodpager/pagerdemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ PagerDemod::~PagerDemod()
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, true);

if (m_basebandSink->isRunning()) {
stop();
Expand All @@ -97,7 +97,7 @@ void PagerDemod::setDeviceAPI(DeviceAPI *deviceAPI)
if (deviceAPI != m_deviceAPI)
{
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
m_deviceAPI->removeChannelSink(this, false);
m_deviceAPI = deviceAPI;
m_deviceAPI->addChannelSink(this);
m_deviceAPI->addChannelSinkAPI(this);
Expand Down
Loading

0 comments on commit a91fa3b

Please sign in to comment.