Skip to content

Commit 5fa03a0

Browse files
committed
Check whether input is detected in updateSettings()
1 parent b3c1ba6 commit 5fa03a0

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

Source/Processors/SourceNode/SourceNode.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ void SourceNode::updateSettings()
138138
for (int i = 0; i < dataStreams.size(); i++)
139139
dataStreams[i]->addProcessor(processorInfo.get());
140140

141+
142+
isEnabled = dataThread->foundInputSource();
143+
144+
LOGD(getName(), " isEnabled = ", isEnabled, " (updateSettings)");
145+
141146
}
142147
}
143148

@@ -187,18 +192,22 @@ bool SourceNode::tryEnablingEditor()
187192
{
188193
if (! isSourcePresent())
189194
{
190-
LOGDD("No input source found.");
195+
//LOGD("No input source found.");
191196
return false;
192197
}
193-
else if (isEnabled)
198+
199+
//LOGD("isEnabled = ", isEnabled, " (tryEnablingEditor)");
200+
201+
if (isEnabled)
194202
{
195203
// If we're already enabled (e.g. if we're being called again
196204
// due to timerCallback()), then there's no need to go through
197205
// the editor again.
206+
//LOGD("We're already enabled; returning.");
198207
return true;
199208
}
200209

201-
LOGD("Input source found.");
210+
LOGD(getName(), " -- input source found!");
202211

203212
CoreServices::updateSignalChain(getEditor());
204213

@@ -229,7 +238,7 @@ bool SourceNode::startAcquisition()
229238

230239
if (isSourcePresent())
231240
{
232-
stopTimer();
241+
stopTimer(); // stop checking for source connection
233242

234243
dataThread->startAcquisition();
235244
return true;

0 commit comments

Comments
 (0)