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:
parent
e4197920c3
commit
9176cf54ce
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user