[][src]Function lsl_sys::lsl_create_inlet

pub unsafe extern "C" fn lsl_create_inlet(
    info: lsl_streaminfo,
    max_buflen: i32,
    max_chunklen: i32,
    recover: i32
) -> lsl_inlet

Construct a new stream inlet from a resolved stream info. @param info A resolved stream info object (as coming from one of the resolver functions). @note The inlet makes a copy of the info object at its construction. @note The stream_inlet may also be constructed with a fully-specified stream_info, if the desired channel format and count is already known up-front, but this is strongly discouraged and should only ever be done if there is no time to resolve the stream up-front (e.g., due to limitations in the client program). @param max_buflen Optionally the maximum amount of data to buffer (in seconds if there is a nominal sampling rate, otherwise x100 in samples).

Recording applications want to use a fairly large buffer size here, while real-time applications would only buffer as much as they need to perform their next calculation.

A good default is 360, which corresponds to 6 minutes of data. @param max_chunklen Optionally the maximum size, in samples, at which chunks are transmitted. If specified as 0, the chunk sizes preferred by the sender are used. Recording applications can use a generous size here (leaving it to the network how to pack things), while real-time applications may want a finer (perhaps 1-sample) granularity. @param recover Try to silently recover lost streams that are recoverable (=those that that have a source_id set).

It is generally a good idea to enable this, unless the application wants to act in a special way when a data provider has temporarily crashed.

If recover is 0 or the stream is not recoverable, most outlet functions will return an #lsl_lost_error if the stream's source is lost. @return A newly created lsl_inlet handle or NULL in the event that an error occurred.