winealsa.drv: check for alsa-lib return codes properly
Timofei V. Bondarenko
tim at ipi.ac.ru
Fri Nov 9 09:10:24 CST 2007
This patch fixes 2 generic bug in handling alsa-lib error codes returned
by snd_pcm_avail_update() function:
1) a signed return value (of type snd_pcm_sframes_t) assigned to
unsigned DWORD variable and then compared to < 0
2) the return value translated by snd_pcm_frames_to_bytes() and then
compared to (DWORD)-1
Neither way can catch usual overrun error (return value of -22).
More over in case of XRUN winealsa goes into near to infinite
transfer of (DWORD)-22 frames...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8926 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071109/a5af137c/attachment.bin
More information about the wine-patches