wishlist: add a mode in pw_stream to do pre-filling of future buffers as early as possible
Currently, in async (non-RT) playback mode, pw_stream calls the process
callback about 1 driver period before the stream underruns, no matter how big is the stream's node.latency
and the buffers it provides. So, for example, if the driver's period is 1024 samples and the application fills 4096 samples on each buffer every time the process
callback is called, then the stream will allow 3072 samples to be consumed before it calls the process
callback again. In some cases, this is a bit tight, especially if the application needs to perform large amounts of processing or I/O in order to fill the next buffer.
This can be solved currently by having the application run a separate thread where it "pushes" into pw_stream, ignoring the process
callback completely. It would be nice, though, if there was a mode that calls the process
callback as soon as there is an available buffer to be dequeued for filling. This would allow the application to maintain a large queue fill level without having to run its own "push" thread.