File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ class data_receiver : public cancellable_registry {
7070 // / Check whether the underlying buffer is empty. This value may be inaccurate.
7171 bool empty () { return sample_queue_.empty (); }
7272
73+ std::size_t samples_available () { return sample_queue_.read_available (); }
74+
7375 // / Flush the queue, return the number of dropped samples
7476 uint32_t flush () noexcept { return sample_queue_.flush (); }
7577
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ class stream_inlet_impl {
302302 * Query the current size of the buffer, i.e. the number of samples that are buffered.
303303 * Note that this value may be inaccurate and should not be relied on for program logic.
304304 */
305- std::size_t samples_available () { return (std:: size_t )(! data_receiver_.empty () ); }
305+ std::size_t samples_available () { return data_receiver_.samples_available ( ); }
306306
307307 // / Flush the queue, return the number of dropped samples
308308 uint32_t flush () { return data_receiver_.flush (); }
You can’t perform that action at this time.
0 commit comments