From 034ada1ed7e748a1855b84f1b004cab0550c7b92 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Mon, 26 Jul 2021 16:40:05 +0200 Subject: [PATCH] Fixed freeze when removing the recorder --- recorder/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recorder/src/main.cpp b/recorder/src/main.cpp index f5e6fb1..0492788 100644 --- a/recorder/src/main.cpp +++ b/recorder/src/main.cpp @@ -106,6 +106,7 @@ public: // Stop recording if (recording) { stopRecording(); } + vol.setInput(&dummyStream); if (audioInput != NULL) { sigpath::sinkManager.unbindStream(selectedStreamName, audioInput); } sigpath::sinkManager.onStreamRegistered.unbindHandler(&streamRegisteredHandler); @@ -418,8 +419,8 @@ private: if (name != _this->selectedStreamName) { return; } if (_this->recording) { _this->stopRecording(); } if (_this->audioInput != NULL) { - sigpath::sinkManager.unbindStream(_this->selectedStreamName, _this->audioInput); _this->vol.setInput(&_this->dummyStream); + sigpath::sinkManager.unbindStream(_this->selectedStreamName, _this->audioInput); _this->audioInput = NULL; } }