1
0
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:
Tux3 / Mlkj / !Lev.uXFMLA 2014-08-28 12:52:04 +02:00
parent 444972f214
commit c657296535

View File

@ -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;