> Agreed: You can pick those two patches, and then we add a third patch to
> both branches, which brings back the watermark for tsched devices and 20
> ms for non-tsched. Assuming my suspicion is not disproved, of course.
> What does Pierre think of that?

I don't want the watermark to be used for rewinds. The watermark is
there for timer-based scheduling, so that you have enough time to
wake-up from sleep and still refill the buffer.
The rewinds happens when the processor is already awake, pulseaudio up
and running and only the remix part needs to happen. Plus the
watermark varies and the logic could really be improved.

Also I think 20ms for rewinds is way too much. This will kill your
actual latency. Imagine you have a low-latency app that starts, the
first sample would be heard after at best 20ms. Not acceptable for
speech or interactive sounds.

But I agree that 256-bytes isn't fool-proof for heavy duty use cases
such 8ch 192kHz 32-bit float.

So how about we keep 256 bytes (1.33 ms for 48kHz) but add a 1.33 ms
threshold to make sure we never rewind below.

rewind_safeguard = max(256, pa_usec_to_bytes(1330));

This way you solve both the hardware issue (frequency independent) and
leave enough headroom for the system to avoid underflows.
-Pierre
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to