pushChunk method
Pushes a chunk of samples to the outlet.
Parameters:
samples: One list ofchannelCountvalues per sample.timestamp: Optional capture time of the last sample (0.0/null = now); earlier samples are spaced backwards by the sampling rate.timestamps: Optional per-sample timestamps (length must equalsamples.length); mutually exclusive withtimestamp.pushthrough: Optionally override the outlet's chunking for this push (true= send immediately).
Chunk transfer trades per-sample latency for throughput: one native
call (and, with a matching chunkSize, one network write) moves the
whole block. Works for every format except undefined (void); string
values must not contain NUL bytes (see pushChunkBytes).
Returns: Error code (0 = success).
See also: pushChunkSync, pushChunkTyped
Implementation
Future<int> pushChunk(
List<List<dynamic>> samples, {
double? timestamp,
List<double>? timestamps,
bool? pushthrough,
}) => _useIsolates
? _pushChunkIsolated(samples, timestamp, timestamps, pushthrough)
: Future.value(
_pushChunkDirect(samples, timestamp, timestamps, pushthrough),
);