diff --git a/Source/Processors/Channel/InfoObjects.cpp b/Source/Processors/Channel/InfoObjects.cpp index 705f1ac81dd3a2eacb599a1b9f124a474c45386d..cb847a6b0468b46e0b8d14e62230fd050c0cadae 100644 --- a/Source/Processors/Channel/InfoObjects.cpp +++ b/Source/Processors/Channel/InfoObjects.cpp @@ -30,18 +30,23 @@ HistoryObject::HistoryObject() {} NamedInfoObject::NamedInfoObject() {} //NodeInfoBase -NodeInfoBase::NodeInfoBase(uint16 id) : - m_nodeID(id) +NodeInfoBase::NodeInfoBase(uint16 id, uint16 idx) : +m_nodeID(id), m_nodeIdx(idx) {} NodeInfoBase::~NodeInfoBase() {} -unsigned int NodeInfoBase::getCurrentNodeID() const +uint16 NodeInfoBase::getCurrentNodeID() const { return m_nodeID; } +uint16 NodeInfoBase::getCurrentNodeChannelIdx() const +{ + return m_nodeIdx; +} + String NodeInfoBase::getCurrentNodeType() const { return m_currentNodeType; @@ -143,7 +148,7 @@ String NamedInfoObject::getDescription() const //InfoObjectCommon InfoObjectCommon::InfoObjectCommon(uint16 idx, uint16 typeidx, float sampleRate, const GenericProcessor* source, uint16 subproc) - : NodeInfoBase(source->getNodeId()), + : NodeInfoBase(source->getNodeId(), idx), SourceProcessorInfo(source, subproc), m_sourceIndex(idx), m_sourceTypeIndex(typeidx), diff --git a/Source/Processors/Channel/InfoObjects.h b/Source/Processors/Channel/InfoObjects.h index 0f937c3868f25882c98f315dc6c318476e85d5ed..cdda5769ef0e0546a494e5c4617b5ae97ab67666 100644 --- a/Source/Processors/Channel/InfoObjects.h +++ b/Source/Processors/Channel/InfoObjects.h @@ -49,15 +49,19 @@ class PLUGIN_API NodeInfoBase public: virtual ~NodeInfoBase(); /** Gets the ID of the processor which currently owns this copy of the info object */ - unsigned int getCurrentNodeID() const; + uint16 getCurrentNodeID() const; + /** Gets the index of this channel in the processor which currently owns this copy of the info object */ + uint16 getCurrentNodeChannelIdx() const; /** Gets the type of the processor which currently owns this copy of the info object */ String getCurrentNodeType() const; /** Gets the name of the processor which currently owns this copy of the info object */ String getCurrentNodeName() const; protected: NodeInfoBase() = delete; - NodeInfoBase(uint16 id); + NodeInfoBase(uint16 id, uint16 idx); +private: uint16 m_nodeID{ 0 }; + uint16 m_nodeIdx{ 0 }; String m_currentNodeType; String m_currentNodeName; }; diff --git a/Source/Processors/GenericProcessor/GenericProcessor.cpp b/Source/Processors/GenericProcessor/GenericProcessor.cpp index b0f11fd1ea3f1ac4f200b4f4cdad0a055f86f7ec..7597465ddbcb21140cc89120722b3ccd4356ed18 100755 --- a/Source/Processors/GenericProcessor/GenericProcessor.cpp +++ b/Source/Processors/GenericProcessor/GenericProcessor.cpp @@ -412,6 +412,7 @@ void GenericProcessor::updateChannelIndexes(bool updateNodeID) if (updateNodeID) { channel->m_nodeID = nodeId; + channel->m_nodeIdx = i; channel->m_currentNodeName = getName(); channel->m_currentNodeType = getName(); //Fix when the ability to name individual processors is implemented } @@ -424,6 +425,7 @@ void GenericProcessor::updateChannelIndexes(bool updateNodeID) if (updateNodeID) { channel->m_nodeID = nodeId; + channel->m_nodeIdx = i; channel->m_currentNodeName = getName(); channel->m_currentNodeType = getName(); //Fix when the ability to name individual processors is implemented } @@ -436,6 +438,7 @@ void GenericProcessor::updateChannelIndexes(bool updateNodeID) if (updateNodeID) { channel->m_nodeID = nodeId; + channel->m_nodeIdx = i; channel->m_currentNodeName = getName(); channel->m_currentNodeType = getName(); //Fix when the ability to name individual processors is implemented }