http://bugs.winehq.org/show_bug.cgi?id=28723
--- Comment #105 from Jörg Höhle hoehle@users.sourceforge.net 2011-12-20 12:27:01 CST --- Created attachment 38049 --> http://bugs.winehq.org/attachment.cgi?id=38049 alternative patchset #5
Here's a patchset that leaves alsa_write as is, relying on the small ALSA buffer to limit writes. However, it also removes the "decrement padding by period size deltas" known from shared mode. This is bad and needs to be restored. GCP might return held_frames % mmdev_period_frames, except upon underrun or when stopped, but a too small GCP needs a larger mmdevapi buffer...
Patch 0003 contains the set_periods logic from comment #102. IMHO that's the one to send next, not the original set_buffer_near(3-4*mmdev_period).
I've also included the "don't use snd_pcm_drop" and the 2xsnd_pcm_drop hack for PulseAudio. PA is ***. I spent hours wondering why the tests failed, then I found out that PA wasn't working correctly anymore, even speaker-test produced silence.