sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
114 stars 67 forks source link

[REQ] Optionally prevent send buffer overflow #221

Open cboulay opened 3 months ago

cboulay commented 3 months ago

Context:

I am playing back an XDF file through LSL to test my online pipelines. I would like to push data through the LSL Outlet(s) as fast as possible but not faster than my inlet(s) can handle. Instead of manually tuning my playback rate for every different scenario, I thought it would be cool if the playback could self-regulate. I think I can use the stream's buffer duration (from 6 minutes to ~5 seconds) and the inlet's pull_chunk size as my arguments to control buffer size and chunk size. What I don't have currently is the ability to prevent overflowing the send buffer.

Brainstorm:

Any other ideas?