Skip to content

Commit 438b6fc

Browse files
committed
Generate timestamps
1 parent 7b8603c commit 438b6fc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ elseif(APPLE)
8484
set_property(TARGET ${PLUGIN_NAME} APPEND_STRING PROPERTY LINK_FLAGS
8585
"-undefined dynamic_lookup -rpath @loader_path/../../../../shared")
8686

87-
install(TARGETS ${PLUGIN_NAME} DESTINATION $ENV{HOME}/Library/Application\ Support/open-ephys/plugins-api9)
87+
install(TARGETS ${PLUGIN_NAME} DESTINATION $ENV{HOME}/Library/Application\ Support/open-ephys/plugins-api10)
8888
set(CMAKE_PREFIX_PATH /opt/local)
8989
endif()
9090

Source/SimulatedSource.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#include "SimulatedSource.h"
2525

2626
SimulatedSource::SimulatedSource (String name, int channels_, float sampleRate_, SimulatedSourceType type)
27-
: Thread (name)
27+
: Thread (name),
28+
simulatedTimestamp(0.0)
2829
{
2930
numChannels = channels_;
3031
sampleRate = sampleRate_;
@@ -83,7 +84,8 @@ void SimulatedSource::run()
8384
}
8485

8586
sampleNumbers[sample_num] = sampleNumber++;
86-
timestamps[sample_num] = -1.0;
87+
timestamps[sample_num] = simulatedTimestamp;
88+
simulatedTimestamp += 1.0 / sampleRate;
8789

8890
if (clk_period > 0)
8991
{

Source/SimulatedSource.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18329,6 +18329,7 @@ class SimulatedSource : public Thread
1832918329
void run() override;
1833018330

1833118331
SimulatedData simulatedData;
18332+
double simulatedTimestamp;
1833218333

1833318334
std::vector<float>* data;
1833418335
int availableSamples;

Source/SourceSimThread.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ void SourceSimThread::updateSettings (OwnedArray<ContinuousChannel>* continuousC
101101
apBandName,
102102
"Neural data sampled @ 30kHz ",
103103
"SP" + String (i) + "_AP",
104-
30000.0f
104+
30000.0f,
105+
true
105106
};
106107

107108
dataStreams->add (new DataStream (apSettings));

0 commit comments

Comments
 (0)