pushSample method
Pushes a sample to the outlet.
Parameters:
data: List of values that will be used to initialize the sample. The type should match the channel format and length should match the channel count.timestamp: Optional capture time in LSL.localClock seconds (0.0/null = now). Use this to back-date a sample to when it was actually acquired rather than when it was pushed.pushthrough: Optionally override the outlet's chunking for this sample;truesends it immediately,falselets liblsl batch it with subsequent samples (liblsl's default istrue).
Execution:
- Isolated mode: Async message passing to worker isolate
- Direct mode: Immediate FFI call wrapped in Future
Returns: Error code (0 = success).
See also: pushSampleSync for zero-overhead direct calls
Implementation
Future<int> pushSample(
Iterable<dynamic> data, {
double? timestamp,
bool? pushthrough,
}) => _useIsolates
? _pushSampleIsolated(data, timestamp, pushthrough)
: Future.value(_pushSampleDirect(data, timestamp, pushthrough));