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

Allow to change audio i/o device mid-call

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

View File

@ -1892,6 +1892,14 @@ void Core::useAudioInput(const QString& inDevDescr)
qWarning() << "Core: Cannot open input audio device";
else
qDebug() << "Core: Opening audio input "<<inDevDescr;
// Force to regen each call's sources
for (ToxGroupCall& call : groupCalls)
call.alSources.clear();
// Force to restart any call's capture
if (alInDev)
alcCaptureStart(alInDev);
}
void Core::useAudioOutput(const QString& outDevDescr)
@ -1922,4 +1930,8 @@ void Core::useAudioOutput(const QString& outDevDescr)
qDebug() << "Core: Opening audio output "<<outDevDescr;
}
// Force to regen each call's sources
for (ToxGroupCall& call : groupCalls)
call.alSources.clear();
}