flush method

Future<int> flush()

Flushes the inlet's buffer. Execution:

  • Isolated mode: Async message passing to worker isolate _flushIsolated
  • Direct mode: Immediate FFI call wrapped in Future lsl_inlet_flush Returns: Number of samples dropped during flush.

Implementation

Future<int> flush() => _useIsolates
    ? _flushIsolated()
    : Future.value(lsl_inlet_flush(_inletBang));