Merge branch 'audio-enhance'

merge-requests/7/head
Roeland Jansen 2021-10-20 14:49:42 +02:00
commit 52a4016379
1 zmienionych plików z 6 dodań i 69 usunięć

Wyświetl plik

@ -67,81 +67,22 @@ udpServer::~udpServer()
{
qInfo(logUdpServer()) << "Closing udpServer";
connMutex.lock();
foreach(CLIENT * client, controlClients)
{
if (client->idleTimer != Q_NULLPTR)
{
client->idleTimer->stop();
delete client->idleTimer;
}
if (client->pingTimer != Q_NULLPTR) {
client->pingTimer->stop();
delete client->pingTimer;
}
deleteConnection(&controlClients, client);
if (client->retransmitTimer != Q_NULLPTR) {
client->retransmitTimer->stop();
delete client->retransmitTimer;
}
delete client;
controlClients.removeAll(client);
}
foreach(CLIENT * client, civClients)
{
if (client->idleTimer != Q_NULLPTR)
{
client->idleTimer->stop();
delete client->idleTimer;
}
if (client->pingTimer != Q_NULLPTR) {
client->pingTimer->stop();
delete client->pingTimer;
}
if (client->retransmitTimer != Q_NULLPTR) {
client->retransmitTimer->stop();
delete client->retransmitTimer;
}
delete client;
civClients.removeAll(client);
deleteConnection(&civClients, client);
}
foreach(CLIENT * client, audioClients)
{
if (client->idleTimer != Q_NULLPTR)
{
client->idleTimer->stop();
delete client->idleTimer;
}
if (client->pingTimer != Q_NULLPTR) {
client->pingTimer->stop();
delete client->pingTimer;
}
if (client->retransmitTimer != Q_NULLPTR) {
client->retransmitTimer->stop();
delete client->retransmitTimer;
}
delete client;
audioClients.removeAll(client);
}
if (rxAudioTimer != Q_NULLPTR) {
rxAudioTimer->stop();
delete rxAudioTimer;
rxAudioTimer = Q_NULLPTR;
}
if (rxAudioThread != Q_NULLPTR) {
rxAudioThread->quit();
rxAudioThread->wait();
}
if (txAudioThread != Q_NULLPTR) {
txAudioThread->quit();
txAudioThread->wait();
deleteConnection(&audioClients, client);
}
// Now all connections are deleted, close and delete the sockets.
if (udpControl != Q_NULLPTR) {
udpControl->close();
delete udpControl;
@ -154,10 +95,6 @@ udpServer::~udpServer()
udpAudio->close();
delete udpAudio;
}
connMutex.unlock();
}
@ -1519,7 +1456,6 @@ void udpServer::sendRetransmitRequest(CLIENT* c)
it.value()++;
}
}
c->missMutex.unlock();
if (missingSeqs.length() != 0)
{
@ -1548,6 +1484,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c)
udpMutex.unlock();
}
}
c->missMutex.unlock();
}