kopia lustrzana https://gitlab.com/eliggett/wfview
Small fixes to UDP server
rodzic
446ed4ef26
commit
7cb9ae9195
|
@ -745,9 +745,11 @@ audioHandler::~audioHandler()
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
if (audioOutput != Q_NULLPTR) {
|
if (audioOutput != Q_NULLPTR) {
|
||||||
|
audioOutput->stop();
|
||||||
delete audioOutput;
|
delete audioOutput;
|
||||||
}
|
}
|
||||||
if (audioInput != Q_NULLPTR) {
|
if (audioInput != Q_NULLPTR) {
|
||||||
|
audioInput->stop();
|
||||||
delete audioInput;
|
delete audioInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -649,27 +649,25 @@ void udpServer::audioReceived()
|
||||||
current->seqPrefix++;
|
current->seqPrefix++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0xac is the smallest possible audio packet.
|
if (hasTxAudio == datagram.senderAddress())
|
||||||
audioPacket tempAudio;
|
{
|
||||||
tempAudio.seq = (quint32)current->seqPrefix << 16 | in->seq;
|
// 0xac is the smallest possible audio packet.
|
||||||
tempAudio.time = QTime::currentTime();;
|
audioPacket tempAudio;
|
||||||
tempAudio.sent = 0;
|
tempAudio.seq = (quint32)current->seqPrefix << 16 | in->seq;
|
||||||
tempAudio.datain = r.mid(0x18);
|
tempAudio.time = QTime::currentTime();;
|
||||||
// Prefer signal/slot to forward audio as it is thread/safe
|
tempAudio.sent = 0;
|
||||||
// Need to do more testing but latency appears fine.
|
tempAudio.datain = r.mid(0x18);
|
||||||
//if (hasTxAudio == datagram.senderAddress())
|
//qDebug(logUdpServer()) << "sending tx audio " << in->seq;
|
||||||
//{
|
|
||||||
qDebug(logUdpServer()) << "sending tx audio " << in->seq;
|
|
||||||
emit haveAudioData(tempAudio);
|
emit haveAudioData(tempAudio);
|
||||||
//}
|
}
|
||||||
//rxaudio->incomingAudio(tempAudio);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
commonReceived(&audioClients, current, r);
|
if (current != Q_NULLPTR) {
|
||||||
|
commonReceived(&audioClients, current, r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue