http://bugs.winehq.org/show_bug.cgi?id=27937
--- Comment #5 from Jörg Höhle hoehle@users.sourceforge.net 2011-09-19 09:41:31 CDT --- That bug is caused by waveform.c:WOD_PushData filling up the whole buffer with silence when the queue is empty. IMHO winmm has no business feeding that much silence. Something at most period_size should be the upper limit, if at all.
Feeding silence is strictly superfluous (once mmdevapi works correctly). I'm not convinced it helps in avoiding cracks at the end of a sound (IIRC MS recommends doing that) any better than simply entering an underrun. Why should it, what would be different?
I believe cracks are avoided by reducing volume or alternatively decreasing the sample value towards 0. Immediately writing 0 is asking for a crackling noise when the last sample value was e.g. 0.96.
Feeding silence is quite bad because it adds delays. What if the app submits data 0.5ms after winmm decided to write some silence? Suddenly pauses will be heard where there should be none.
See bug #28027 for another issue caused by writing silence.