Check when audio has been buffered

merge-requests/9/head
Phil Taylor 2022-01-14 20:29:27 +00:00
rodzic b4884e773a
commit 7d5ec8a065
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -743,13 +743,14 @@ void audioHandler::incomingAudio(audioPacket inPacket)
return;
}
if ((inPacket.seq > lastSentSeq + 1) && (setup.codec == 0x40 || setup.codec == 0x80)) {
qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Attempting FEC on packet" << inPacket.seq << "as last is"<<lastSentSeq ;
qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Attempting FEC on packet" << inPacket.seq << "as last is" << lastSentSeq;
lastSentSeq = inPacket.seq;
incomingAudio(inPacket); // Call myself again to run the packet a second time (FEC)
}
lastSentSeq = inPacket.seq;
if (ringBuf->size() > ringBuf->capacity() / 2)
if (!audioBuffered && ringBuf->size() > ringBuf->capacity() / 2)
{
qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Audio buffering complete, capacity:" <<ringBuf->capacity() << ", used:" << ringBuf->size();
audioBuffered = true;
}
return;