@@ -818,7 +818,7 @@ void SpikeDetector::loadCustomParametersFromXml(XmlElement* xml)
818818
819819 SpikeChannel::Type type = SpikeChannel::typeFromNumChannels (spikeParamsXml->getIntAttribute (" num_channels" , 1 ));
820820
821- if (!alreadyLoaded (name, type, stream_source))
821+ if (!alreadyLoaded (name, type, stream_source, stream_name ))
822822 {
823823 uint16 streamId = findSimilarStream (stream_source, stream_name, sample_rate, true );
824824
@@ -849,7 +849,7 @@ void SpikeDetector::loadCustomParametersFromXml(XmlElement* xml)
849849 }
850850}
851851
852- bool SpikeDetector::alreadyLoaded (String name, SpikeChannel::Type type, int stream_source)
852+ bool SpikeDetector::alreadyLoaded (String name, SpikeChannel::Type type, int stream_source, String stream_name )
853853{
854854 // std::cout << "Next channel: " << name << ", " << (int) type << ", " << stream_source << std::endl;
855855
@@ -862,7 +862,9 @@ bool SpikeDetector::alreadyLoaded(String name, SpikeChannel::Type type, int stre
862862
863863 // std::cout << "LOCAL" << std::endl;
864864
865- if (ch->getName () == name && ch->getChannelType () == type && getDataStream (ch->getStreamId ())->getSourceNodeId () == stream_source)
865+ if (ch->getName () == name && ch->getChannelType () == type
866+ && getDataStream (ch->getStreamId ())->getSourceNodeId () == stream_source
867+ && getDataStream (ch->getStreamId ())->getName () == stream_name)
866868 {
867869 // std::cout << "found match." << std::endl;
868870 return true ;
0 commit comments