]> Repos - portaudio/commit
wasapi: Improve stability of playback in Polling Shared mode with a low host latency...
authordmitrykos <dmitrykos@neutroncode.com>
Wed, 30 Sep 2020 09:55:28 +0000 (12:55 +0300)
committerdmitrykos <dmitrykos@neutroncode.com>
Sat, 3 Oct 2020 19:55:36 +0000 (22:55 +0300)
commit697fcddce5e9f1307711489f5b47b15c139c5e12
tree16ff04354c4e3b63c9b7f3d1201e14297a2e431c
parentd7c67287b88222e0238d1d0f8d3bc76fb09eebb0
wasapi: Improve stability of playback in Polling Shared mode with a low host latency requsted (22 ms):

- Implement workaround for system timer coarse granularity causing underruns by using timeBeginPeriod/timeEndPeriod APIs inside the Event and Poll thread handlers.
- Update next sleep time of the Poll rendering loop dynamically depending on time taken for processing/rendering of audio data into the available host buffer to avoid underruns and fit processing time into periodic polling time slots.
- Add support for time slots logging in Poll mode if PA_WASAPI_LOG_TIME_SLOTS is defined. Fixed audible glitches by preloading the whole host buffer before stream is started.
- Fix audible glitches on stream start by preloading the whole host buffer before stream is started.
src/hostapi/wasapi/pa_win_wasapi.c