Skip to content

wasapisink: reduce buffer latency in shared low-latency mode

Henry Goffin requested to merge AMZN-hgoffin/gstreamer:lowlatency into main

cap WASAPI buffer usage at the period size, as there is no need to fill the WASAPI buffer beyond the first device period. the ringbuffer thread has an entire period to wake up and refill the buffer before WASAPI will consume it again. the default buffer size is 25ms, which introduces 15ms of extra latency beyond the 10ms default period.

add "min-period" property on wasapisink with a default value of 2.5ms. in theory some hardware and driver combo may support periods as low as a single sample, but anything below 2.5ms is risking glitches due to typical thread scheduling delays (and is impossible to test locally).

Edited by Henry Goffin

Merge request reports