@@ -117,7 +117,7 @@ typedef struct lsl_xml_ptr_struct_* lsl_xml_ptr;
117117typedef struct lsl_continuous_resolver_ * lsl_continuous_resolver ;
118118
119119
120- /** @section Free functions provided by the lab streaming layer */
120+ /** # Free functions provided by the lab streaming layer */
121121
122122/** LSL version the binary was compiled against
123123 * Used either to check if the same version is used
@@ -257,15 +257,19 @@ extern LIBLSL_C_API void lsl_destroy_string(char *s);
257257* Construct a new streaminfo object.
258258*
259259* Core stream information is specified here. Any remaining meta-data can be added later.
260- * @param name Name of the stream. Describes the device (or product series) that this stream makes available
260+ * @param name Name of the stream.<br>
261+ * Describes the device (or product series) that this stream makes available
261262* (for use by programs, experimenters or data analysts). Cannot be empty.
262263* @param type Content type of the stream. Please see https://github.com/sccn/xdf/wiki/Meta-Data (or web search for:
263264* XDF meta-data) for pre-defined content-type names, but you can also make up your own.
264265* The content type is the preferred way to find streams (as opposed to searching by name).
265266* @param channel_count Number of channels per sample. This stays constant for the lifetime of the stream.
266- * @param nominal_srate The sampling rate (in Hz) as advertised by the data source, if regular (otherwise set to IRREGULAR_RATE).
267- * @param channel_format Format/type of each channel. If your channels have different formats, consider supplying
268- * multiple streams or use the largest type that can hold them all (such as cft_double64). A good default is cft_float32.
267+ * @param nominal_srate The sampling rate (in Hz) as advertised by the
268+ * datasource, if regular (otherwise set to #LSL_IRREGULAR_RATE).
269+ * @param channel_format Format/type of each channel.<br>
270+ * If your channels have different formats, consider supplying multiple streams
271+ * or use the largest type that can hold them all (such as #cft_double64).<br>
272+ * A good default is #cft_float32.
269273* @param source_id Unique identifier of the source or device, if available (such as the serial number).
270274* Allows recipients to recover from failure even after the serving app or device crashes.
271275* May in some cases also be constructed from device settings.
@@ -684,82 +688,69 @@ extern LIBLSL_C_API double lsl_time_correction_ex(lsl_inlet in, double *remote_t
684688* smoothed/dejittered if desired. This function allows automating these two and possibly more operations.
685689* Warning: when you enable this, you will no longer receive or be able to recover the original time stamps.
686690* @param in The lsl_inlet object to act on.
687- * @param flags An integer that is the result of bitwise OR'ing one or more options from processing_options_t
688- * together (e.g., post_clocksync|post_dejitter); a good setting is to use post_ALL.
689- * @return The error code: if nonzero, can be lsl_argument_error if an unknown flag was passed in.
691+ * @param flags An integer that is the result of bitwise OR'ing one or more options from
692+ * #processing_options_t together (e.g., #post_clocksync|#post_dejitter);
693+ * a good setting is to use post_ALL.
694+ * @return The error code: if nonzero, can be #lsl_argument_error if an unknown flag was passed in.
690695*/
691696extern LIBLSL_C_API int32_t lsl_set_postprocessing (lsl_inlet in , uint32_t flags );
692697
693698
694699/* === Pulling a sample from the inlet === */
695700
696701/**
697- * Pull a sample from the inlet and read it into a pointer to values.
698- * Handles type checking & conversion.
699- * @param in The lsl_inlet object to act on.
700- * @param buffer A pointer to hold the resulting values.
701- * @param buffer_elements The number of samples allocated in the buffer. Note: it is the responsibility of the user to allocate enough memory.
702- * @param timeout The timeout for this operation, if any. Use LSL_FOREVER to effectively disable it. It is also permitted to use
703- * 0.0 here; in this case a sample is only returned if one is currently buffered.
704- * @param ec Error code: can be either no error or lsl_lost_error (if the stream source has been lost).
705- * Note: if the timeout expires before a new sample was received the function returns 0.0;
706- * ec is *not* set to lsl_timeout_error (because this case is not considered an error condition).
707- * @return The capture time of the sample on the remote machine, or 0.0 if no new sample was available.
708- * To remap this time stamp to the local clock, add the value returned by lsl_time_correction() to it.
709- */
702+ * Pull a sample from the inlet and read it into a pointer to values.
703+ * Handles type checking & conversion.
704+ * @param in The #lsl_inlet object to act on.
705+ * @param buffer A pointer to hold the resulting values.
706+ * @param buffer_elements The number of samples allocated in the buffer. Note: it is the
707+ * responsibility of the user to allocate enough memory.
708+ * @param timeout The timeout for this operation, if any.
709+ * Use #LSL_FOREVER to effectively disable it. It is also permitted to use 0.0 here;
710+ * in this case a sample is only returned if one is currently buffered.
711+ * @param ec Error code: can be either no error or #lsl_lost_error
712+ * (if the stream source has been lost).<br>
713+ * Note: if the timeout expires before a new sample was received the function returns 0.0;
714+ * ec is *not* set to #lsl_timeout_error (because this case is not considered an error condition).
715+ * @return The capture time of the sample on the remote machine, or 0.0 if no new sample was
716+ * available. To remap this time stamp to the local clock, add the value returned by
717+ * lsl_time_correction() to it.
718+ * @{
719+ */
710720extern LIBLSL_C_API double lsl_pull_sample_f (lsl_inlet in , float * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
711721extern LIBLSL_C_API double lsl_pull_sample_d (lsl_inlet in , double * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
712722extern LIBLSL_C_API double lsl_pull_sample_l (lsl_inlet in , long * buffer , int buffer_elements , double timeout , int * ec );
713723extern LIBLSL_C_API double lsl_pull_sample_i (lsl_inlet in , int32_t * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
714724extern LIBLSL_C_API double lsl_pull_sample_s (lsl_inlet in , int16_t * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
715725extern LIBLSL_C_API double lsl_pull_sample_c (lsl_inlet in , char * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
716726extern LIBLSL_C_API double lsl_pull_sample_str (lsl_inlet in , char * * buffer , int32_t buffer_elements , double timeout , int32_t * ec );
727+ //!@}
717728
718- /**
719- * Pull a sample from the inlet and read it into an array of binary strings.
720- *
721- * These strings may contains 0's, therefore the lengths are read into the buffer_lengths array.
722- * Handles type checking & conversion.
723- * @param in The lsl_inlet object to act on.
724- * @param buffer A pointer to hold the resulting data.
725- * @param buffer_lengths A pointer to an array that holds the resulting lengths for each returned binary string.
726- * @param buffer_elements The number of samples allocated in the buffer and buffer_lengths variables.
727- * Note: it is the responsibility of the user to allocate enough memory.
728- * @param timeout The timeout for this operation, if any. Use LSL_FOREVER to effectively disable it. It is also permitted to use
729- * 0.0 here; in this case a sample is only returned if one is currently buffered.
730- * @param ec Error code: can be either no error or lsl_lost_error (if the stream source has been lost).
731- * Note: if the timeout expires before a new sample was received the function returns 0.0;
732- * ec is *not* set to lsl_timeout_error (because this case is not considered an error condition).
733- * @return The capture time of the sample on the remote machine, or 0.0 if no new sample was available.
734- * To remap this time stamp to the local clock, add the value returned by lsl_time_correction() to it.
735- */
729+ /** @copydoc lsl_pull_sample_f
730+ * These strings may contains 0's, therefore the lengths are read into the buffer_lengths array.
731+ * @param buffer_lengths
732+ * A pointer to an array that holds the resulting lengths for each returned binary string.*/
736733extern LIBLSL_C_API double lsl_pull_sample_buf (lsl_inlet in , char * * buffer ,
737734 uint32_t * buffer_lengths , int32_t buffer_elements , double timeout , int32_t * ec );
738735
739736/**
740737 * Pull a sample from the inlet and read it into a custom struct or buffer.
741738 *
742- * Overall size checking but no type checking or conversion are done. Do not use for
743- * variable-size/string-formatted streams.
744- * @param in The lsl_inlet object to act on.
745- * @param buffer Pointer to hold the sample data.<br>
746- * Search for [`#pragma pack`](https://stackoverflow.com/a/3318475/73299)
747- * for information on how to pack structs appropriately.
739+ * Overall size checking but no type checking or conversion are done.
740+ * Do not use for variable-size/string-formatted streams.
741+ * @param in The #lsl_inlet object to act on.
742+ * @param buffer A pointer to hold the resulting values.
748743 * @param buffer_bytes Length of the array held by buffer in bytes, not items
749744 * @param timeout The timeout for this operation, if any.
750- * Aside from LSL_FOREVER it is also permitted to use 0.0 here;
751- * in this case a sample is only returned if one is currently buffered.
752- * @param ec Error code: can be either no error or `lsl_lost_error`
753- * (if the stream source has been lost).
754- *
755- * Note: if the timeout expires before a new sample was received the function returns 0.0;
756- * ec is *not* set to lsl_timeout_error() (because this case is not considered an error
757- * condition).
745+ * Use #LSL_FOREVER to effectively disable it. It is also permitted to use 0.0 here;
746+ * in this case a sample is only returned if one is currently buffered.
747+ * @param ec Error code: can be either no error or #lsl_lost_error
748+ * (if the stream source has been lost).<br>
749+ * Note: if the timeout expires before a new sample was received the function returns 0.0;
750+ * ec is *not* set to #lsl_timeout_error (because this case is not considered an error condition).
758751 * @return The capture time of the sample on the remote machine, or 0.0 if no new sample was
759- * available.
760- *
761- * To remap this time stamp to the local clock, add the value returned by lsl_time_correction() to
762- * it.
752+ * available. To remap this time stamp to the local clock, add the value returned by
753+ * lsl_time_correction() to it.
763754 */
764755extern LIBLSL_C_API double lsl_pull_sample_v (lsl_inlet in , void * buffer , int32_t buffer_bytes , double timeout , int32_t * ec );
765756
@@ -783,6 +774,7 @@ extern LIBLSL_C_API double lsl_pull_sample_v(lsl_inlet in, void *buffer, int32_t
783774* Note: if the timeout expires before a new sample was received the function returns 0.0;
784775* ec is *not* set to lsl_timeout_error (because this case is not considered an error condition).
785776* @return data_elements_written Number of channel data elements written to the data buffer.
777+ * @{
786778*/
787779extern LIBLSL_C_API unsigned long lsl_pull_chunk_f (lsl_inlet in , float * data_buffer , double * timestamp_buffer , unsigned long data_buffer_elements , unsigned long timestamp_buffer_elements , double timeout , int32_t * ec );
788780extern LIBLSL_C_API unsigned long lsl_pull_chunk_d (lsl_inlet in , double * data_buffer , double * timestamp_buffer , unsigned long data_buffer_elements , unsigned long timestamp_buffer_elements , double timeout , int32_t * ec );
@@ -792,6 +784,8 @@ extern LIBLSL_C_API unsigned long lsl_pull_chunk_s(lsl_inlet in, int16_t *data_b
792784extern LIBLSL_C_API unsigned long lsl_pull_chunk_c (lsl_inlet in , char * data_buffer , double * timestamp_buffer , unsigned long data_buffer_elements , unsigned long timestamp_buffer_elements , double timeout , int32_t * ec );
793785extern LIBLSL_C_API unsigned long lsl_pull_chunk_str (lsl_inlet in , char * * data_buffer , double * timestamp_buffer , unsigned long data_buffer_elements , unsigned long timestamp_buffer_elements , double timeout , int32_t * ec );
794786
787+ ///@}
788+
795789/**
796790* Pull a chunk of data from the inlet and read it into an array of binary strings.
797791*
0 commit comments