mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Seems we were not deleting the right hrtfs when a node is killed
Simple fix, just make sure we delete the hrtfs associated with the killedNode. The test is to delete some nodes (agents) and make sure nothing bad happens to audio mixer, or the audio itself.
This commit is contained in:
parent
9a774553ae
commit
21d1f40f59
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue