As discussed on #shirakumo pa_simple_write call (during mixed:mix) periodically blocks for ~50ms if initialized with default buffering attributes which results in a delay between harmony:play call and the actual start of the playback.
tlength (playback) and fragsize (recording) should be set to the maximum latency that the application can deal with. It seems that it corresponds to the buffer size.
prebuf and minreq are recommended to be set to the default value ((uint32_t) -1 = #xffffffff) which leaves the initialization of the parameter to the pulse audio server.
maxlength could be set to a lower value to set an upper bound for latency, but that comes at cost of getting more underruns if it is set lower than what the server can reliably handle. It seems to me that the default value is good enough.
As discussed on #shirakumo
pa_simple_write
call (duringmixed:mix
) periodically blocks for ~50ms if initialized with default buffering attributes which results in a delay betweenharmony:play
call and the actual start of the playback.Per documentation:
tlength
(playback) andfragsize
(recording) should be set to the maximum latency that the application can deal with. It seems that it corresponds to the buffer size.prebuf
andminreq
are recommended to be set to the default value ((uint32_t) -1
=#xffffffff
) which leaves the initialization of the parameter to the pulse audio server.maxlength
could be set to a lower value to set an upper bound for latency, but that comes at cost of getting more underruns if it is set lower than what the server can reliably handle. It seems to me that the default value is good enough.