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:
parent
bde042ba3a
commit
c5f4ceee6b
|
@ -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++;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user