-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
According to the docstring, samples_available() is supposed to return the number of samples in the buffer.
liblsl/src/stream_inlet_impl.h
Lines 301 to 305 in 1eaaf08
| /** | |
| * Query the current size of the buffer, i.e. the number of samples that are buffered. | |
| * Note that this value may be inaccurate and should not be relied on for program logic. | |
| */ | |
| std::size_t samples_available() { return (std::size_t)(!data_receiver_.empty()); } |
But it returns (std::size_t)(!data_receiver_.empty());, and data_receiver_.empty() returns a boolean sample_queue_.empty();
Line 71 in 1eaaf08
| bool empty() { return sample_queue_.empty(); } |
So samples_available() will only ever return 0 or 1.
Metadata
Metadata
Assignees
Labels
No labels