http://bugs.winehq.org/show_bug.cgi?id=29294
--- Comment #38 from Jörg Höhle hoehle@users.sourceforge.net 2012-03-09 12:16:00 CST --- James, what was the sound experience while running the tests? Judging from the render log, I'd say: - no stuttering, however - one underrun every 5 seconds from clock skew. The CreateTimerQueue stabilisator patch will help here (but not eliminate it entirely). That causes an audible glitch every time.
Every underrun costs 50ms or more, for unknown reason. It also explains the occasional Wait() failure: 2307.448:trace:alsa:alsa_write_data pad: 480 render.c:2104: Test failed: Wait iteration 3233 gave 102 2307.518:warn:alsa:alsa_write_best_effort writei failed, recovering: -32 (Broken pipe) ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred 2307.518:trace:alsa:alsa_write_data pad: 432
- A few alsa_write_best_effort writei failed However, unlike bug #30118, much to my surprise, the device keeps running. So another underrun is signaled a little later, this time causing a lead-in to be written. Then audio restarts for another 5 seconds. 2406.776:trace:alsa:alsa_write_data pad: 48 2406.776:warn:alsa:alsa_write_best_effort writei failed, recovering: -32 (Broken pipe) ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred 2406.778:trace:alsa:AudioClient_GetCurrentPadding (0x12b0a8)->(0x32fbe8) [...] 2406.796:trace:alsa:alsa_write_data pad: 48 [...] 2406.800:trace:alsa:AudioRenderClient_ReleaseBuffer (0x12b0a8)->(480, 0) 2406.806:trace:alsa:alsa_write_data XRun state avail 18000, recovering 2406.807:trace:alsa:alsa_write_data lead-in 6192
I don't know how to explain the difference in behaviour. Maybe it's solely a bad interaction with DSound, after all. Please try out Andrew Eikum's patches attached to bug #30118.
- The occasional GetBuffer(NULL) test failure is somewhat caused by a limitation of the winealsa driver. We need another design to mimic native's regular decrease of padding when facing huge ALSA periods like 125ms. Here mmdevapi's buffer is full, ALSA is over 2/3 full, so mmdevapi will not write more frames.
Does VLC use DSound for output? Would it use mmdevapi directly if you switched winecfg to w7 mode?