kopia lustrzana https://gitlab.com/eliggett/wfview
Latency on server is wrong way round!
rodzic
e00fa26229
commit
d4868ae14c
|
@ -554,7 +554,7 @@ qint64 audioHandler::writeData(const char* data, qint64 nBytes)
|
|||
int send = qMin((int)(nBytes - sentlen), chunkBytes - tempBuf.sent);
|
||||
tempBuf.data.append(QByteArray::fromRawData(data + sentlen, send));
|
||||
sentlen = sentlen + send;
|
||||
tempBuf.seq = 0; // Not used in TX
|
||||
tempBuf.seq = lastSentSeq;
|
||||
tempBuf.time = QTime::currentTime();
|
||||
tempBuf.sent = tempBuf.sent + send;
|
||||
}
|
||||
|
@ -568,6 +568,7 @@ qint64 audioHandler::writeData(const char* data, qint64 nBytes)
|
|||
}
|
||||
tempBuf.data.clear();
|
||||
tempBuf.sent = 0;
|
||||
lastSentSeq++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,7 +751,7 @@ void audioHandler::getNextAudioChunk(QByteArray& ret)
|
|||
|
||||
if (currentLatency > setup.latency) {
|
||||
qInfo(logAudio()) << (setup.isinput ? "Input" : "Output") << "Packet " << hex << packet.seq <<
|
||||
" arrived too late (increase output latency!) " <<
|
||||
" arrived too late (increase latency!) " <<
|
||||
dec << packet.time.msecsTo(QTime::currentTime()) << "ms";
|
||||
// if (!ringBuf->try_read(packet))
|
||||
// break;
|
||||
|
|
|
@ -61,11 +61,11 @@ void udpServer::init()
|
|||
QUdpSocket::connect(udpAudio, &QUdpSocket::readyRead, this, &udpServer::audioReceived);
|
||||
|
||||
#if !defined(PORTAUDIO) && !defined(RTAUDIO)
|
||||
qInfo(logUdpServer()) << "Server audio input:" << inAudio.port.deviceName();
|
||||
qInfo(logUdpServer()) << "Server audio output:" << outAudio.port.deviceName();
|
||||
qInfo(logUdpServer()) << "Server audio input (RX):" << inAudio.port.deviceName();
|
||||
qInfo(logUdpServer()) << "Server audio output (TX):" << outAudio.port.deviceName();
|
||||
#else
|
||||
qInfo(logUdpServer()) << "Server audio input:" << inAudio.name;
|
||||
qInfo(logUdpServer()) << "Server audio output:" << outAudio.name;
|
||||
qInfo(logUdpServer()) << "Server audio input (RX):" << inAudio.name;
|
||||
qInfo(logUdpServer()) << "Server audio output (TX):" << outAudio.name;
|
||||
#endif
|
||||
wdTimer = new QTimer();
|
||||
connect(wdTimer, &QTimer::timeout, this, &udpServer::watchdog);
|
||||
|
@ -323,7 +323,6 @@ void udpServer::controlReceived()
|
|||
{
|
||||
outAudio.codec = current->txCodec;
|
||||
outAudio.samplerate = current->txSampleRate;
|
||||
outAudio.latency = current->txBufferLen;
|
||||
outAudio.isinput = false;
|
||||
|
||||
txaudio = new audioHandler();
|
||||
|
@ -346,6 +345,7 @@ void udpServer::controlReceived()
|
|||
{
|
||||
inAudio.codec = current->rxCodec;
|
||||
inAudio.samplerate = current->rxSampleRate;
|
||||
inAudio.latency = current->txBufferLen;
|
||||
inAudio.isinput = true;
|
||||
|
||||
rxaudio = new audioHandler();
|
||||
|
|
Ładowanie…
Reference in New Issue