playsound.c SND_ASYNC fix

Vedran Rodic vrodic at gmail.com
Sat Jun 9 14:04:16 CDT 2007


Hi, this is a rebase of my patch, following recent cleanup work from Alexandre.

On 5/23/07, Vedran Rodic <vrodic at gmail.com> wrote:
> Detailed info:
>
> Applications expect PlaySound() not to block when called with SND_ASYNC
> flag. However, if a sound is currently playing, there is a real chance of
> PlaySound() blocking for up to 1/3 of a second (size of the playsound
> buffer), because of a sound buffer waiting to be played. This patch adds a
> hWave field in the WINE_PLAYSOUND internal struct in winemm.h so that
> MULTIMEDIA_PlaySound() function can call waveOutReset when a sound is
> already playing to quickly remove it from the sound system. Another scenario
> is when application wants to quickly  stop a currently playing sound at a
> specific time. Blocking behaviour isn't necessarily a problem for such
> applications, but playing the sound for additional 300 miliseconds could be.
>
> ChangeLog entry:
> Vedran Rodic <vrodic at gmail.com>
> - fix PlaySound so it doesn't block when another sound is already playing.
>
>
> Vedran Rodic
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: playsound.diff
Type: text/x-diff
Size: 3420 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070609/191fc134/playsound.bin


More information about the wine-patches mailing list