Merge pull request #9001 from davidkelly/dk/useKilledNode

Seems we were not deleting the right hrtfs when a node is killed
This commit is contained in:
Brad Hefta-Gaub 2016-11-04 14:34:52 -07:00 committed by GitHub
commit e763082afc

View file

@ -591,10 +591,10 @@ void AudioMixer::handleNodeKilled(SharedNodePointer killedNode) {
// enumerate the connected listeners to remove HRTF objects for the disconnected node
auto nodeList = DependencyManager::get<NodeList>();
nodeList->eachNode([](const SharedNodePointer& node) {
nodeList->eachNode([&killedNode](const SharedNodePointer& node) {
auto clientData = dynamic_cast<AudioMixerClientData*>(node->getLinkedData());
if (clientData) {
clientData->removeHRTFsForNode(node->getUUID());
clientData->removeHRTFsForNode(killedNode->getUUID());
}
});
}