mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
packet version handling in audio-mixer
This commit is contained in:
parent
693463ae5b
commit
9b1fefe671
1 changed files with 8 additions and 7 deletions
|
@ -345,13 +345,14 @@ int main(int argc, const char* argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pull any new audio data from nodes off of the network stack
|
// pull any new audio data from nodes off of the network stack
|
||||||
while (nodeList->getNodeSocket()->receive(nodeAddress, packetData, &receivedBytes)) {
|
while (nodeList->getNodeSocket()->receive(nodeAddress, packetData, &receivedBytes) &&
|
||||||
|
versionForPacketType(packetData[0]) == packetData[1]) {
|
||||||
if (packetData[0] == PACKET_TYPE_MICROPHONE_AUDIO_NO_ECHO ||
|
if (packetData[0] == PACKET_TYPE_MICROPHONE_AUDIO_NO_ECHO ||
|
||||||
packetData[0] == PACKET_TYPE_MICROPHONE_AUDIO_WITH_ECHO) {
|
packetData[0] == PACKET_TYPE_MICROPHONE_AUDIO_WITH_ECHO) {
|
||||||
Node* avatarNode = nodeList->addOrUpdateNode(nodeAddress,
|
Node* avatarNode = nodeList->addOrUpdateNode(nodeAddress,
|
||||||
nodeAddress,
|
nodeAddress,
|
||||||
NODE_TYPE_AGENT,
|
NODE_TYPE_AGENT,
|
||||||
nodeList->getLastNodeID());
|
nodeList->getLastNodeID());
|
||||||
|
|
||||||
if (avatarNode->getNodeID() == nodeList->getLastNodeID()) {
|
if (avatarNode->getNodeID() == nodeList->getLastNodeID()) {
|
||||||
nodeList->increaseNodeID();
|
nodeList->increaseNodeID();
|
||||||
|
@ -382,9 +383,9 @@ int main(int argc, const char* argv[]) {
|
||||||
|
|
||||||
if (!matchingInjector) {
|
if (!matchingInjector) {
|
||||||
matchingInjector = nodeList->addOrUpdateNode(NULL,
|
matchingInjector = nodeList->addOrUpdateNode(NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NODE_TYPE_AUDIO_INJECTOR,
|
NODE_TYPE_AUDIO_INJECTOR,
|
||||||
nodeList->getLastNodeID());
|
nodeList->getLastNodeID());
|
||||||
nodeList->increaseNodeID();
|
nodeList->increaseNodeID();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue