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

fix Audio::subscribeInput

Audio input/output device will only be opened, if not initialized already.
This commit is contained in:
Nils Fenner 2015-11-08 06:00:05 +01:00
parent bde042ba3a
commit c5f4ceee6b
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C

View File

@ -137,21 +137,21 @@ If the input device is not open, it will be opened before capturing.
void Audio::subscribeInput()
{
qDebug() << "subscribing input" << inputSubscriptions;
if (!inputSubscriptions++)
{
if (!alInDev) {
openInput(Settings::getInstance().getInDev());
if (!alOutDev)
openOutput(Settings::getInstance().getOutDev());
#if (!FIX_SND_PCM_PREPARE_BUG)
if (alInDev)
{
if (alInDev) {
qDebug() << "starting capture";
alcCaptureStart(alInDev);
}
#endif
}
if (!alOutDev)
openOutput(Settings::getInstance().getOutDev());
inputSubscriptions++;
}
/**