mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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
|
||||
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 ||
|
||||
packetData[0] == PACKET_TYPE_MICROPHONE_AUDIO_WITH_ECHO) {
|
||||
Node* avatarNode = nodeList->addOrUpdateNode(nodeAddress,
|
||||
nodeAddress,
|
||||
NODE_TYPE_AGENT,
|
||||
nodeList->getLastNodeID());
|
||||
nodeAddress,
|
||||
NODE_TYPE_AGENT,
|
||||
nodeList->getLastNodeID());
|
||||
|
||||
if (avatarNode->getNodeID() == nodeList->getLastNodeID()) {
|
||||
nodeList->increaseNodeID();
|
||||
|
@ -382,9 +383,9 @@ int main(int argc, const char* argv[]) {
|
|||
|
||||
if (!matchingInjector) {
|
||||
matchingInjector = nodeList->addOrUpdateNode(NULL,
|
||||
NULL,
|
||||
NODE_TYPE_AUDIO_INJECTOR,
|
||||
nodeList->getLastNodeID());
|
||||
NULL,
|
||||
NODE_TYPE_AUDIO_INJECTOR,
|
||||
nodeList->getLastNodeID());
|
||||
nodeList->increaseNodeID();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue