You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deduced-timestamp bookkeeping can turn a genuine 2 ms interval into 1 ms #149
While validating LabRecorder for PRAYCG, our EEG/EMG/EOG/light-sensor workbench, we reproduced a timestamp round-trip error using synthetic data. I’d appreciate your review of the finding and proposed fix.
In typed_transfer_loop(), after recognizing a deducible timestamp, the code sets:
last_timestamp = ts + sample_interval;
This leaves the predictor one sample interval ahead of the actual timestamp. A subsequent genuine two-interval step can therefore be incorrectly marked as deduced.
Minimal reproduction
For a nominal 1,000 Hz stream, construct these timestamps using repeated double-precision additions:
This produces [t0, 0, t2] for the example and preserves all three timestamps.
Recording-test evidence and limitations
An unmodified Windows x64 v1.17.0 CLI recording failed our raw-timestamp comparison despite retaining all 500 expected EMG samples and complete stream footers.
Our locally patched build passed 12 synthetic recording trials—six GUI and six CLI—with synchronization and dejittering disabled during timestamp checks. These covered regular spacing, the two-interval pattern, duplicates, gaps, mixed rates, and both shutdown orders.
For transparency, the local build also contains other changes and uses a different adjacent native LSL DLL. Those recording results are not an isolated one-line binary comparison; the minimal source-level reproduction above isolates the predictor defect.
We retained synthetic XDF files, expected timestamp vectors, logs, and build identities. No participant data is involved, and we are not claiming every existing recording is affected.
I saw the shutdown and clock-offset timeout work in PR #146, so I’m keeping this timestamp-compression report separate.
Could you review the correction and whether a regression test should be added? If this is already tracked, please point me to the existing discussion.
Activity