Enumerations / Flags

Postprocessing options:

enum lsl_processing_options_t

Post-processing options for stream inlets.

Values:

proc_none = 0

No automatic post-processing; return the ground-truth time stamps for manual post-processing. This is the default behavior of the inlet.

proc_clocksync = 1

Perform automatic clock synchronization; equivalent to manually adding the time_correction() value to the received time stamps.

proc_dejitter = 2

Remove jitter from time stamps.

This will apply a smoothing algorithm to the received time stamps; the smoothing needs to see a minimum number of samples (30-120 seconds worst-case) until the remaining jitter is consistently below 1ms.

proc_monotonize = 4

Force the time-stamps to be monotonically ascending.

Only makes sense if timestamps are dejittered.

proc_threadsafe = 8

Post-processing is thread-safe (same inlet can be read from by multiple threads); uses somewhat more CPU.

proc_ALL = 1 | 2 | 4 | 8

The combination of all possible post-processing options.

Channel formats:

enum lsl_channel_format_t

Data format of a channel (each transmitted sample holds an array of channels).

Values:

cft_float32 = 1

For up to 24-bit precision measurements in the appropriate physical unit (e.g., microvolts). Integers from -16777216 to 16777216 are represented accurately.

cft_double64 = 2

For universal numeric data as long as permitted by network & disk budget. The largest representable integer is 53-bit.

cft_string = 3

For variable-length ASCII strings or data blobs, such as video frames, complex event descriptions, etc.

cft_int32 = 4

For high-rate digitized formats that require 32-bit precision. Depends critically on meta-data to represent meaningful units. Useful for application event codes or other coded data.

cft_int16 = 5

For very high rate signals (40Khz+) or consumer-grade audio. For professional audio float is recommended.

cft_int8 = 6

For binary signals or other coded data. Not recommended for encoding string data.

cft_int64 = 7

For now only for future compatibility. Support for this type is not yet exposed in all languages. Also, some builds of liblsl will not be able to send or receive data of this type.

cft_undefined = 0

Can not be transmitted.

Error codes:

enum lsl_error_code_t

Possible error codes.

Values:

lsl_no_error = 0

No error occurred.

lsl_timeout_error = -1

The operation failed due to a timeout.

lsl_lost_error = -2

The stream has been lost.

lsl_argument_error = -3

An argument was incorrectly specified (e.g., wrong format or wrong length).

lsl_internal_error = -4

Some other internal error has happened.