fix replicant handling slot, add node strings for replicants

This commit is contained in:
Stephen Birarda 2017-06-12 11:31:35 -07:00
parent c7b3b79a23
commit d5b466e3ae
3 changed files with 6 additions and 2 deletions
assignment-client/src/audio
libraries/networking/src

View file

@ -100,10 +100,11 @@ AudioMixer::AudioMixer(ReceivedMessage& message) :
PacketType::ReplicatedSilentAudioFrame,
PacketType::ReplicatedNegotiateAudioFormat
},
this, "queueMirroredAudioPacket"
this, "queueReplicatedAudioPacket"
);
connect(nodeList.data(), &NodeList::nodeKilled, this, &AudioMixer::handleNodeKilled);
}
void AudioMixer::queueAudioPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node) {

View file

@ -744,7 +744,8 @@ void LimitedNodeList::removeSilentNodes() {
SharedNodePointer node = it->second;
node->getMutex().lock();
if ((usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * USECS_PER_MSEC)) {
if (node->getType() != NodeType::ReplicantAudioMixer && node->getType() != NodeType::ReplicantAvatarMixer
&& (usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * USECS_PER_MSEC)) {
// call the NodeHash erase to get rid of this node
it = _nodeHash.unsafe_erase(it);

View file

@ -42,6 +42,8 @@ void NodeType::init() {
TypeNameHash.insert(NodeType::MessagesMixer, "Messages Mixer");
TypeNameHash.insert(NodeType::AssetServer, "Asset Server");
TypeNameHash.insert(NodeType::EntityScriptServer, "Entity Script Server");
TypeNameHash.insert(NodeType::ReplicantAudioMixer, "Replicant Audio Mixer");
TypeNameHash.insert(NodeType::ReplicantAvatarMixer, "Replicant Avatar Mixer");
TypeNameHash.insert(NodeType::Unassigned, "Unassigned");
}