Why the default 200ms latency on module-loopback?
Hi,
I found myself in the very normal situation where i wanted to hear my own microphone input in my speakers. To do that you need to have module-loopback loaded.
Loading it in it's default values like so:
pactl load-module module-loopback
Gives me a very noticeable delay in microphone audio. A delay that didn't make sense at all to me. So i went on a google endeavor just to find that the default latency is 200ms https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/modules/module-loopback.c#L62
Turns out that loading the module with:
pactl load-module module-loopback latency_msec=1
Is the lowest amount of latency that's apparently accepted. Microphone input now does sound very snappy with no real apparent latency. I guess 1ms can't really be noticed.
Now i'm sure there are very good reasons to default to 200 ms, right? In the case of a microphone this does now give a "bad experience by default" which i'm sure isn't the intention here.
But this does make me wonder, why a latency at all?
Isn't 0ms (i tried, it fails with Failure: Module initialization failed
) a very valid usecase too?
Why is a latency at all needed???
Best regards, Mark