GNOME Bugzilla – Bug 646570
baseaudiosink: don't allow aligning behind the read-segment
Last modified: 2011-04-04 07:32:19 UTC
Created attachment 184986 [details] [review] patch 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. NOTE: I saw that the discont-message had been made into a non-warning. I changed that back, since a discont will *always* become a glitch in the audio, and any self-respecting application should try to avoid these, and would want to be notified when it happens.
commit 588ac0ae6fdfb55c612cc84f5426cbf1ee4aec4e Author: Havard Graff <havard.graff@tandberg.com> Date: Tue Feb 8 18:27:43 2011 +0100 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.