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