LSLInlet<T> constructor
LSLInlet<T> (
- LSLStreamInfo _streamInfo, {
- int maxBuffer = 360,
- int chunkSize = 0,
- bool recover = true,
- double createTimeout = LSL_FOREVER,
- Set<
LSLTransportOptions> transportOptions = const {}, - bool useIsolates = true,
Creates a new LSLInlet instance. Parameters:
- streamInfo: The stream information to create the inlet for.
maxBuffer: Maximum buffer size in seconds (default: 360).chunkSize: Maximum chunk length in seconds (default: 0).recover: Whether to recover from lost samples (default: true).createTimeout: Secondslsl_open_streammay block while opening the data connection (default: LSL_FOREVER, i.e. ~370 days). Used in both modes — direct mode passes it tolsl_open_streamin_createDirect. In direct mode the call is a synchronous FFI call on the calling thread, so leaving this at the default lets an unreachable peer block that thread indefinitely; callers sharing a thread or isolate between several inlets should set a bounded value.useIsolates: Whether to use isolates for thread safety (default: true) This is recommended for most use cases to ensure thread safety, if you choose to use direct mode (useIsolates: false), you most likely will want to still run this in an isolate to avoid blocking the main isolate.
Implementation
LSLInlet(
this._streamInfo, {
this.maxBuffer = 360,
this.chunkSize = 0,
this.recover = true,
this.createTimeout = LSL_FOREVER,
this.transportOptions = const {},
bool useIsolates = true,
}) : _useIsolates = useIsolates;