ba_read_chunk#
Read buffered stream data from the active backend.
Function Signature#
function [data, meta] = ba_read_chunk(timeout_ms, drain)
Usage#
[data, meta] = ba_read_chunk()
[data, meta] = ba_read_chunk(timeout_ms, drain)
Inputs#
timeout_msoptional timeout in milliseconds.
drainoptional logical flag that drains buffered chunks when true.
Outputs#
datachannels x samples double matrix.
metametadata struct describing availability and sample counts.
Example#
[data, meta] = ba_read_chunk(1000, true)
Notes#
Reads the chunks buffered by the running stream, and after ba_stop_stream the ones still unread (including the stream’s last, shorter chunk).
Source File#
matlab/ba_read_chunk.m