Skip to content

Commit 876f1be

Browse files
committed
Prevent sync line from getting set to none for streams that don't generate timestamps
1 parent f422bbc commit 876f1be

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Source/Processors/RecordNode/RecordNode.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,24 @@ void RecordNode::parameterValueChanged (Parameter* p)
170170
synchronizer.setSyncLine (streamKey, selectedLine);
171171

172172
// Assume overrideTimestampWarningShown is already true if a sync line is set for any hardware-synced stream
173-
if (getDataStream (streamKey)->generatesTimestamps()
174-
&& selectedLine >= 0
175-
&& !overrideTimestampWarningShown)
173+
if (getDataStream (streamKey)->generatesTimestamps()
174+
&& selectedLine >= 0
175+
&& ! overrideTimestampWarningShown)
176176
{
177177
overrideTimestampWarningShown = true;
178178
}
179179

180-
// If sync line is set to none and this is the main stream, we need to find another main stream
180+
// If sync line is set to none and this is the main stream
181181
if (selectedLine == -1 && synchronizer.mainStreamKey == streamKey)
182182
{
183+
// If stream does not generate timestamps, set ttl line to 0
184+
if (! getDataStream (streamKey)->generatesTimestamps())
185+
{
186+
p->setNextValue (0, false);
187+
return;
188+
}
189+
190+
// Find a new main stream that is not hardware-synced
183191
int streamIndex = 0;
184192
for (auto stream : dataStreams)
185193
{

0 commit comments

Comments
 (0)