diff --git a/core.cpp b/core.cpp index 21bb2a59f..53530e28a 100644 --- a/core.cpp +++ b/core.cpp @@ -1227,13 +1227,11 @@ void Core::playCallAudio(int callId, ToxAv* toxav) } qDebug() << QString("Core::playCallAudio: Error receiving audio: %1").arg(len); calls[callId].playAudioTimer.start(); - calls[callId].audioOutput->start(&calls[callId].audioBuffer); return; } if (len == 0) { calls[callId].playAudioTimer.start(); - calls[callId].audioOutput->start(&calls[callId].audioBuffer); return; } //qDebug() << QString("Core: Received %1 bytes, %2 audio bytes free, %3 core buffer size") @@ -1243,7 +1241,7 @@ void Core::playCallAudio(int callId, ToxAv* toxav) if (state != QAudio::ActiveState) { qDebug() << QString("Core: Audio state is %1").arg(state); - //if (state == 3 && calls[callId].audioBuffer.bufferSize() >= framesize*2) + if (state == 3 && calls[callId].audioBuffer.bufferSize() >= framesize*2) calls[callId].audioOutput->start(&calls[callId].audioBuffer); } int error = calls[callId].audioOutput->error(); @@ -1277,7 +1275,7 @@ void Core::sendCallAudio(int callId, ToxAv* toxav) calls[callId].sendAudioTimer.start(); return; } - calls[callId].sendAudioTimer.start(1); + calls[callId].sendAudioTimer.start(0); } else calls[callId].sendAudioTimer.start();