Commit 588ac0ae authored by Committed by Sebastian Dröge
baseaudiosink: don't allow aligning behind the read-segment
Given a large enough drift-tolerance, one could end up in a situation where one would keep aligning the written buffers behind the current read-segment position. The result for the reader would be complete silence, possible preceded by very choppy audio. By checking the available headroom, one can determine if there is room to do alignment, or if one should resort to a resync instead to get the pointers back on track. Also refactor the alignment-logic out of the render function for cleaner code.
Showing with 51 additions and 24 deletions