wasapisink: recover from low buffer levels in shared mode
authorChristoph Reiter <reiter.christoph@gmail.com>
Wed, 23 May 2018 19:15:09 +0000 (21:15 +0200)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 25 May 2018 13:36:37 +0000 (19:06 +0530)
commit3b1c7ef8e4ee44706b187c64f3f083627e2d3bbf
treeb5f77a62ba51c56c7b83744cf881ba46cc840fee
parent0aed64426bc2ec443ff637b4b3089174b309eaa8
wasapisink: recover from low buffer levels in shared mode

In case the wasapi buffer levels got low in shared mode we would still wait until
more buffer is available until writing something in it, which means we could never
catch up and recover.

Instead only wait for a new buffer in case the existing one is full and always write
what we can. Also don't loop until all data is written since the base class can handle
that for us and under normal circumstances this doesn't happen anyway.

This only works in shared mode, as in exclusive mode we have to exactly
fill the buffer and always have to wait first.

This fixes noisy (buffer underrun) playback with the wasapisink under load.

https://bugzilla.gnome.org/show_bug.cgi?id=796354
sys/wasapi/gstwasapisink.c