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,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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user