From 8c05399e418f2c0147ce2d9c7dd220a0cdc97765 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Tue, 16 Jan 2018 01:59:53 +0300 Subject: [PATCH] fix: [un]subscribe output in avform Fix sound test on AV settings tab --- src/widget/form/settings/avform.cpp | 2 ++ src/widget/form/settings/avform.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/widget/form/settings/avform.cpp b/src/widget/form/settings/avform.cpp index 01f5e17ed..138f817b9 100644 --- a/src/widget/form/settings/avform.cpp +++ b/src/widget/form/settings/avform.cpp @@ -117,6 +117,7 @@ void AVForm::hideEvent(QHideEvent* event) { if (subscribedToAudioIn) { // TODO: This should not be done in show/hide events + audio->unsubscribeOutput(alSource); audio->unsubscribeInput(); subscribedToAudioIn = false; } @@ -139,6 +140,7 @@ void AVForm::showEvent(QShowEvent* event) if (!subscribedToAudioIn) { // TODO: This should not be done in show/hide events + audio->subscribeOutput(alSource); audio->subscribeInput(); subscribedToAudioIn = true; } diff --git a/src/widget/form/settings/avform.h b/src/widget/form/settings/avform.h index f18676f5e..5bf9b3fdd 100644 --- a/src/widget/form/settings/avform.h +++ b/src/widget/form/settings/avform.h @@ -102,6 +102,7 @@ private: CameraSource& camera; QVector> videoDeviceList; QVector videoModes; + uint alSource; }; #endif