mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:56:25 +02:00
Merge pull request #3547 from birarda/new-qt
fix for ThreadedAssignment readyRead on Qt 5.3.x
This commit is contained in:
commit
4b33cfe838
4 changed files with 12 additions and 1 deletions
|
@ -364,7 +364,6 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(AudioMixerClientData* l
|
||||||
const float ZERO_DB = 1.0f;
|
const float ZERO_DB = 1.0f;
|
||||||
const float NEGATIVE_ONE_DB = 0.891f;
|
const float NEGATIVE_ONE_DB = 0.891f;
|
||||||
const float NEGATIVE_THREE_DB = 0.708f;
|
const float NEGATIVE_THREE_DB = 0.708f;
|
||||||
const float NEGATIVE_SIX_DB = 0.501f;
|
|
||||||
|
|
||||||
const float FILTER_GAIN_AT_0 = ZERO_DB; // source is in front
|
const float FILTER_GAIN_AT_0 = ZERO_DB; // source is in front
|
||||||
const float FILTER_GAIN_AT_90 = NEGATIVE_ONE_DB; // source is incident to left or right ear
|
const float FILTER_GAIN_AT_90 = NEGATIVE_ONE_DB; // source is incident to left or right ear
|
||||||
|
|
|
@ -576,6 +576,13 @@ void LimitedNodeList::sendSTUNRequest() {
|
||||||
stunSockAddr.getAddress(), stunSockAddr.getPort());
|
stunSockAddr.getAddress(), stunSockAddr.getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LimitedNodeList::rebindNodeSocket() {
|
||||||
|
quint16 oldPort = _nodeSocket.localPort();
|
||||||
|
|
||||||
|
_nodeSocket.close();
|
||||||
|
_nodeSocket.bind(QHostAddress::AnyIPv4, oldPort);
|
||||||
|
}
|
||||||
|
|
||||||
bool LimitedNodeList::processSTUNResponse(const QByteArray& packet) {
|
bool LimitedNodeList::processSTUNResponse(const QByteArray& packet) {
|
||||||
// check the cookie to make sure this is actually a STUN response
|
// check the cookie to make sure this is actually a STUN response
|
||||||
// and read the first attribute and make sure it is a XOR_MAPPED_ADDRESS
|
// and read the first attribute and make sure it is a XOR_MAPPED_ADDRESS
|
||||||
|
|
|
@ -69,6 +69,8 @@ public:
|
||||||
const QUuid& getSessionUUID() const { return _sessionUUID; }
|
const QUuid& getSessionUUID() const { return _sessionUUID; }
|
||||||
void setSessionUUID(const QUuid& sessionUUID);
|
void setSessionUUID(const QUuid& sessionUUID);
|
||||||
|
|
||||||
|
|
||||||
|
void rebindNodeSocket();
|
||||||
QUdpSocket& getNodeSocket() { return _nodeSocket; }
|
QUdpSocket& getNodeSocket() { return _nodeSocket; }
|
||||||
QUdpSocket& getDTLSSocket();
|
QUdpSocket& getDTLSSocket();
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,9 @@ void ThreadedAssignment::commonInit(const QString& targetName, NodeType_t nodeTy
|
||||||
NodeList* nodeList = NodeList::getInstance();
|
NodeList* nodeList = NodeList::getInstance();
|
||||||
nodeList->setOwnerType(nodeType);
|
nodeList->setOwnerType(nodeType);
|
||||||
|
|
||||||
|
// this is a temp fix for Qt 5.3 - rebinding the node socket gives us readyRead for the socket on this thread
|
||||||
|
nodeList->rebindNodeSocket();
|
||||||
|
|
||||||
QTimer* domainServerTimer = new QTimer(this);
|
QTimer* domainServerTimer = new QTimer(this);
|
||||||
connect(domainServerTimer, SIGNAL(timeout()), this, SLOT(checkInWithDomainServerOrExit()));
|
connect(domainServerTimer, SIGNAL(timeout()), this, SLOT(checkInWithDomainServerOrExit()));
|
||||||
domainServerTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
|
domainServerTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
|
||||||
|
|
Loading…
Reference in a new issue