iPathID=m_mHashIdentifier2PathID.find(sIdentifierHash)->second;//get path identifier from simulation engine. In future iterations, this will be generated within VA
autopath_pos=m_mPaths.find(iPathID);//find the position of "path_ID" in the map
if(path_pos==m_mPaths.end())
{//if the path ID is not found, create a new path with this ID
CVABinauralOutdoorWaveFront*wave_front=dynamic_cast<CVABinauralOutdoorWaveFront*>(m_pWaveFrontPool->RequestObject());//request a new path from the pool
m_mPaths.insert(std::pair<int,CVABinauralOutdoorWaveFront*>(iPathID,wave_front));//put that path into the map with the label path_ID
//TODO: might need to add a reference to the new path here? *******************************************
intpath_source_ID=1;// path[ "source" ]; //get source ID from incoming data
autochecksrc=m_mSources.find(path_source_ID);
if(checksrc==m_mSources.end())
VA_EXCEPT1("Source ID not found, make sure the source associated with each path exists.");
m_mPaths[iPathID]->SetSource(m_mSources[path_source_ID]);//set the source for this path
VA_WARN("BinauralOutdoorNoiseRenderer","Receiver ID not (yet) found, make sure the source associated with each path exists.");
continue;
}
// If the path ID is not found, create a new path with this ID
CVABinauralOutdoorWaveFront*pWaveFront=dynamic_cast<CVABinauralOutdoorWaveFront*>(m_pWaveFrontPool->RequestObject());//request a new path from the pool
m_mPaths.insert(std::pair<int,CVABinauralOutdoorWaveFront*>(iPathID,pWaveFront));//put that path into the map with the label path_ID
m_mPaths[iPathID]->SetSource(m_mSources[iPathSourceID]);//set the source for this path
m_mPaths[iPathID]->SetReceiver(m_mBinauralReceivers[iPathReceiverID]);//set the sound receiver for this path
}
boolaudible_ok=false;//if this is the first time this path is used, and it does not have the right keys,needs to be set inaudible
@@ -168,7 +168,7 @@ void CVABinauralOutdoorWaveFront::GetOutput( ITASampleBuffer* pfLeftChannel, ITA
}
else
{
VA_EXCEPT1("Unknown interpolation type forwarded to VABinaurlWaveFront, please use either 'LINEAR_INTERPOLATION' or 'SWITCH'.");
VA_EXCEPT1("Can't switch interpolation, unknown interpolation type forwarded to BinauralOutdoorNoiseRenderer, please use either 'LINEAR_INTERPOLATION' or 'SWITCH'.");
}
// Apply ITD correction
...
...
@@ -197,7 +197,17 @@ void CVABinauralOutdoorWaveFront::GetOutput( ITASampleBuffer* pfLeftChannel, ITA