Skip to content

Commit b54ff43

Browse files
committed
Make setChannelSelectionState consistent with getChannelSelectionState
1 parent 2a80471 commit b54ff43

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

Source/Processors/Editors/GenericEditor.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ void GenericEditor::update()
540540
drawerButton->setVisible(true);
541541
}
542542

543-
543+
544544

545545
updateVisualizer(); // does nothing unless this method
546546
// has been implemented
@@ -639,9 +639,9 @@ void GenericEditor::setChannelSelectionState(int chan, bool p, bool r, bool a)
639639
{
640640
if (!isSplitOrMerge)
641641
{
642-
channelSelector->setParamStatus(chan+1, p);
643-
channelSelector->setRecordStatus(chan+1, r);
644-
channelSelector->setAudioStatus(chan+1, a);
642+
channelSelector->setParamStatus(chan, p);
643+
channelSelector->setRecordStatus(chan, r);
644+
channelSelector->setAudioStatus(chan, a);
645645
}
646646
}
647647

@@ -1428,4 +1428,3 @@ void ThresholdSlider::setValues(Array<double> v)
14281428
{
14291429
valueArray = v;
14301430
}
1431-

Source/Processors/GenericProcessor/GenericProcessor.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void GenericProcessor::update()
321321
{
322322
DataChannel* sourceChan = sourceNode->dataChannelArray[i];
323323
DataChannel* ch = new DataChannel (*sourceChan);
324-
324+
325325

326326
if (i < m_recordStatus.size())
327327
{
@@ -384,7 +384,7 @@ void GenericProcessor::update()
384384

385385
updateSettings(); // allow processors to change custom settings
386386

387-
updateChannelIndexes();
387+
updateChannelIndexes();
388388

389389
m_needsToSendTimestampMessages.clear();
390390
m_needsToSendTimestampMessages.insertMultiple(-1, false, getNumSubProcessors());
@@ -606,7 +606,7 @@ juce::uint64 GenericProcessor::getTimestamp (int channelNum) const
606606
int subProcessorIdx = 0;
607607
int64 ts = 0;
608608

609-
if (channelNum >= 0
609+
if (channelNum >= 0
610610
&& channelNum < dataChannelArray.size())
611611
{
612612
sourceNodeId = dataChannelArray[channelNum]->getSourceNodeID();
@@ -678,7 +678,7 @@ void GenericProcessor::setTimestampAndSamples(juce::uint64 timestamp, uint32 nSa
678678

679679
HeapBlock<char> data;
680680
size_t dataSize = SystemEvent::fillTimestampAndSamplesData(data, this, subProcessorIdx, timestamp, nSamples);
681-
681+
682682

683683
eventBuffer.addEvent(data, dataSize, 0);
684684

@@ -831,7 +831,7 @@ void GenericProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& even
831831
m_currentMidiBuffer = &eventBuffer;
832832
processEventBuffer (); // extract buffer sizes and timestamps,
833833
// set flag on all TTL events to zero
834-
834+
835835
m_lastProcessTime = Time::getHighResolutionTicks();
836836
process (buffer);
837837

@@ -1079,7 +1079,7 @@ void GenericProcessor::loadChannelParametersFromXml (XmlElement* channelInfo, In
10791079
{
10801080
if (subNode->hasTagName ("SELECTIONSTATE"))
10811081
{
1082-
getEditor()->setChannelSelectionState (channelNum - 1,
1082+
getEditor()->setChannelSelectionState (channelNum,
10831083
subNode->getBoolAttribute ("param"),
10841084
subNode->getBoolAttribute ("record"),
10851085
subNode->getBoolAttribute ("audio"));
@@ -1167,7 +1167,7 @@ int GenericProcessor::getCurrentProgram() { return 0; }
11671167

11681168
int GenericProcessor::getNumInputs() const { return settings.numInputs; }
11691169
int GenericProcessor::getNumOutputs() const { return settings.numOutputs; }
1170-
int GenericProcessor::getNumOutputs(int subProcessorIdx) const
1170+
int GenericProcessor::getNumOutputs(int subProcessorIdx) const
11711171
{
11721172
uint32 sourceId = getProcessorFullId(nodeId, subProcessorIdx);
11731173
try

0 commit comments

Comments
 (0)