1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix logic error in audio subscription code

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-16 20:51:44 +01:00
parent e4197920c3
commit 9176cf54ce
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -28,15 +28,13 @@ ALuint Audio::alMainSource{0};
void Audio::suscribeInput() void Audio::suscribeInput()
{ {
if (userCount++) if (!userCount++ && alInDev)
if (alInDev)
alcCaptureStart(alInDev); alcCaptureStart(alInDev);
} }
void Audio::unsuscribeInput() void Audio::unsuscribeInput()
{ {
if (--userCount) if (!--userCount && alInDev)
if (alInDev)
alcCaptureStop(alInDev); alcCaptureStop(alInDev);
} }