From 9176cf54ce5080a98721a1a6c98d9bcd8402c4af Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sun, 16 Nov 2014 20:51:44 +0100 Subject: [PATCH] Fix logic error in audio subscription code --- src/audio.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/audio.cpp b/src/audio.cpp index d51b31951..46620b6e9 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -28,16 +28,14 @@ ALuint Audio::alMainSource{0}; void Audio::suscribeInput() { - if (userCount++) - if (alInDev) - alcCaptureStart(alInDev); + if (!userCount++ && alInDev) + alcCaptureStart(alInDev); } void Audio::unsuscribeInput() { - if (--userCount) - if (alInDev) - alcCaptureStop(alInDev); + if (!--userCount && alInDev) + alcCaptureStop(alInDev); } void Audio::openInput(const QString& inDevDescr)