http://bugs.winehq.org/show_bug.cgi?id=29299
--- Comment #6 from Andrew Eikum aeikum@codeweavers.com 2012-01-23 11:32:05 CST --- Created attachment 38513 --> http://bugs.winehq.org/attachment.cgi?id=38513 Pre- and post-pads for winealsa
Here's two simple patches which fix both the tiny amount of data problem and the last period not full problem. They're pretty obvious: if there won't be a full period in ALSA before we write, we pre-pad with silence. If there is no data left to write after writing and there isn't a multiple of a full ALSA period in the ALSA buffer, then we write silence to fill out that last period.
I'm concerned about how the second patch affects nearly-empty buffer situations like Bug 28723. I think it should work, but it makes us slightly less tolerant of very low data scenarios (or does it? perhaps ALSA will glitch anyway as it pulls that half-period).
Perhaps I should add TRACEs to these new codepaths...