[][src]Function lsl_sys::lsl_pull_chunk_f

pub unsafe extern "C" fn lsl_pull_chunk_f(
    in_: lsl_inlet,
    data_buffer: *mut f32,
    timestamp_buffer: *mut f64,
    data_buffer_elements: c_ulong,
    timestamp_buffer_elements: c_ulong,
    timeout: f64,
    ec: *mut i32
) -> c_ulong

Pull a chunk of data from the inlet and read it into a buffer.

Handles type checking & conversion.

@attention Note that the provided data buffer size is measured in channel values (e.g. floats) rather than in samples. @param in The lsl_inlet object to act on. @param[out] data_buffer A pointer to a buffer of data values where the results shall be stored. @param[out] timestamp_buffer A pointer to a double buffer where time stamps shall be stored.

If this is NULL, no time stamps will be returned. @param data_buffer_elements The size of the data buffer, in channel data elements (of type T). Must be a multiple of the stream's channel count. @param timestamp_buffer_elements The size of the timestamp buffer.

If a timestamp buffer is provided then this must correspond to the same number of samples as data_buffer_elements. @param timeout The timeout for this operation, if any.

When the timeout expires, the function may return before the entire buffer is filled. The default value of 0.0 will retrieve only data available for immediate pickup. @param[out] ec Error code: can be either no error or #lsl_lost_error (if the stream source has been lost). @note if the timeout expires before a new sample was received the function returns 0.0; ec is not set to #lsl_timeout_error (because this case is not considered an error condition). @return data_elements_written Number of channel data elements written to the data buffer. @{