kopia lustrzana https://gitlab.com/eliggett/wfview
Try delaying RX audio until latency/2
rodzic
3ca21161bf
commit
cfed58e84e
|
@ -965,7 +965,7 @@ qint64 audioHandler::readData(char* data, qint64 maxlen)
|
||||||
//qDebug(logAudio()) << "Packet " << hex << packet->seq << " arrived too late (increase rx buffer size!) " << dec << packet->time.msecsTo(QTime::currentTime()) << "ms";
|
//qDebug(logAudio()) << "Packet " << hex << packet->seq << " arrived too late (increase rx buffer size!) " << dec << packet->time.msecsTo(QTime::currentTime()) << "ms";
|
||||||
packet = audioBuffer.erase(packet); // returns next packet
|
packet = audioBuffer.erase(packet); // returns next packet
|
||||||
}
|
}
|
||||||
else
|
else if (packet->time.msecsTo(QTime::currentTime()) > latency/2)
|
||||||
{
|
{
|
||||||
// Will this packet fit in the current buffer?
|
// Will this packet fit in the current buffer?
|
||||||
int send = qMin((int)((maxlen/divisor) - (sentlen/divisor)), packet->data.length() - packet->sent);
|
int send = qMin((int)((maxlen/divisor) - (sentlen/divisor)), packet->data.length() - packet->sent);
|
||||||
|
|
Ładowanie…
Reference in New Issue