From 9d021b755769bb67da140fe3f34163c48d346c4f Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sat, 1 Oct 2022 11:21:50 +0200 Subject: [PATCH] Fixed bug in M17 modulator and demodulator making them not releasing their audio paths on termination thus locking up the thread on M17 mode re-entering. --- openrtx/src/protocols/M17/M17Demodulator.cpp | 1 + openrtx/src/protocols/M17/M17Modulator.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/openrtx/src/protocols/M17/M17Demodulator.cpp b/openrtx/src/protocols/M17/M17Demodulator.cpp index 8cbe6f8d..66b839d5 100644 --- a/openrtx/src/protocols/M17/M17Demodulator.cpp +++ b/openrtx/src/protocols/M17/M17Demodulator.cpp @@ -189,6 +189,7 @@ void M17Demodulator::init() void M17Demodulator::terminate() { // Ensure proper termination of baseband sampling + audioPath_release(basebandPath); inputStream_stop(basebandId); // Delete the buffers and deallocate memory. diff --git a/openrtx/src/protocols/M17/M17Modulator.cpp b/openrtx/src/protocols/M17/M17Modulator.cpp index a1362c75..39252acf 100644 --- a/openrtx/src/protocols/M17/M17Modulator.cpp +++ b/openrtx/src/protocols/M17/M17Modulator.cpp @@ -67,6 +67,9 @@ void M17Modulator::terminate() txRunning = false; } + // Always ensure that outgoing audio path is closed + audioPath_release(outPath); + // Deallocate memory. baseband_buffer.reset(); }