http://bugs.winehq.org/show_bug.cgi?id=28622
--- Comment #4 from Raymond superquad.vortex2@gmail.com 2011-10-13 21:04:22 CDT --- (In reply to comment #3)
Created attachment 36857 [details] dsound: Request a more exact buffer size from MMDevAPI
(In reply to comment #2)
reduce the period time from 200 *10000 to 2321930 (23.2ms) in dlls/dsound/primary.c seem fix the choppy sound
200ms @44100Hz is too large (> half buffer size when your sound card only have 64K Bytes buffer 371ms)
/* buffer size = 200 * 100000 (100 ns) = 2.0 secods */ hres = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST,
200 * 100000, 50000, device->pwfx, NULL);
2321930, 50000, device->pwfx, NULL);
That's the buffer size, not the period size. In any case, I have this patch in my queue which does the same thing a little more intelligently. It requests the buffer size to be exactly as large as the maximum data that dsound will send to mmdevapi. I've attached it here, and it fixes VLC for me as well.
it is period time in alsa driver , choppy sound because wine is using 1 period per buffer on SB Live! Platinum (8820 frames 0.2 second period time)
The other point is you have removed the difference between primary/secondary buffer , vlc is trying to change the primary buffer format
trace:dsound:DirectSoundDevice_SetCooperativeLevel (0x182f190,0x10040,DSSCL_EXCLUSIVE) warn:dsound:DirectSoundDevice_SetCooperativeLevel level=DSSCL_EXCLUSIVE not fully supported
Since vlc support both winmm and dsound output module , playing a 22050Hz wav with SB Live! Platinum
winealsa(winmm) use 22050Hz (221 frames 10.022ms)
winealsa(dsound) resample to 44100Hz (ds_default_sample_Rate) (512 frames 11.609ms)