mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
We weren't reopening the audio input on subsequent calls
This commit is contained in:
parent
444972f214
commit
c657296535
7
core.cpp
7
core.cpp
|
@ -1359,13 +1359,18 @@ void Core::prepareCall(int friendId, int callId, ToxAv* toxav, bool videoEnabled
|
|||
if (!QAudioDeviceInfo::defaultInputDevice().isFormatSupported(format))
|
||||
{
|
||||
calls[callId].audioInput = nullptr;
|
||||
qWarning() << "Default input format not supported, cannot record audio";
|
||||
qWarning() << "Core: Default input format not supported, cannot record audio";
|
||||
}
|
||||
else if (calls[callId].audioInput==nullptr)
|
||||
{
|
||||
qDebug() << "Core: Starting new audio input";
|
||||
calls[callId].audioInput = new QAudioInput(format);
|
||||
calls[callId].audioInputDevice = calls[callId].audioInput->start();
|
||||
}
|
||||
else if (calls[callId].audioInput->state() == QAudio::StoppedState)
|
||||
{
|
||||
calls[callId].audioInputDevice = calls[callId].audioInput->start();
|
||||
}
|
||||
|
||||
// Go
|
||||
calls[callId].active = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user