Skip to content

Commit 39d1360

Browse files
committed
Merge branch 'harp-timestamps' into recording-optimization-anjal
2 parents edae6f6 + b13deb0 commit 39d1360

6 files changed

Lines changed: 594 additions & 45 deletions

File tree

Source/Processors/FileReader/FileReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ void FileReader::addEventsInRange (int64 start, int64 stop)
788788
uint8 ttlBit = events.channels[i];
789789
bool state = events.channelStates[i] > 0;
790790
TTLEventPtr event = TTLEvent::createTTLEvent (eventChannels[0], events.sampleNumbers[i], ttlBit, state);
791-
addEvent (event, int (absoluteCurrentSampleNumber));
791+
addEvent (event, int (absoluteCurrentSampleNumber - start));
792792
}
793793
}
794794
}

Source/Processors/Parameter/ParameterEditor.cpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,14 +909,30 @@ void SyncControlButton::paintButton (Graphics& g, bool isMouseOver, bool isButto
909909
}
910910
break;
911911
}
912+
case SyncStatus::HARP_CLOCK:
913+
{
914+
Colour harpClockColour = Colour (200, 150, 255); // Light purplse
915+
916+
if (isMouseOver)
917+
{
918+
g.setColour (harpClockColour);
919+
}
920+
else
921+
{
922+
g.setColour (harpClockColour.darker (0.5f));
923+
}
924+
break;
925+
}
912926
}
913927

914928
g.fillRoundedRectangle (2, 2, getWidth() - 4, getHeight() - 4, 3);
915929

930+
// Draw text indicators
931+
g.setColour (Colour (255, 255, 255));
932+
g.setFont (FontOptions ("Inter", "Regular", 12.0f));
933+
916934
if (node->isMainDataStream (streamKey))
917935
{
918-
g.setColour (Colour (255, 255, 255));
919-
g.setFont (FontOptions ("Inter", "Regular", 12.0f));
920936
g.drawText ("M", getLocalBounds().reduced (3), juce::Justification::centred);
921937
}
922938
}

Source/Processors/ProcessorGraph/ProcessorGraph.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,16 +1371,17 @@ void ProcessorGraph::updateConnections()
13711371
sourceMap[node].add (conn);
13721372
}
13731373

1374-
// Finally, actually connect sources to each dest processor,
1375-
// in correct order by merger topography
1376-
for (const auto& destSources : sourceMap)
1377-
{
1378-
GenericProcessor* dest = destSources.first;
1374+
}
13791375

1380-
for (const ConnectionInfo& conn : destSources.second)
1381-
{
1382-
connectProcessors (conn.source, dest, conn.connectContinuous, conn.connectEvents);
1383-
}
1376+
// Finally, actually connect sources to each dest processor,
1377+
// in correct order by merger topography
1378+
for (const auto& destSources : sourceMap)
1379+
{
1380+
GenericProcessor* dest = destSources.first;
1381+
1382+
for (const ConnectionInfo& conn : destSources.second)
1383+
{
1384+
connectProcessors (conn.source, dest, conn.connectContinuous, conn.connectEvents);
13841385
}
13851386
}
13861387
}

Source/Processors/RecordNode/RecordNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ bool RecordNode::isSynchronized()
717717
{
718718
SyncStatus status = synchronizer.getStatus (stream->getKey());
719719

720-
if (status != SYNCED && status != HARDWARE_SYNCED)
720+
if (status != SYNCED && status != HARDWARE_SYNCED && status != HARP_CLOCK)
721721
return false;
722722
}
723723

0 commit comments

Comments
 (0)