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:
parent
20ba8e6192
commit
4932b8fed6
12
src/core.cpp
12
src/core.cpp
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user