mciseq: Prevent busy-wait while paused.

Maarten Lankhorst m.b.lankhorst at gmail.com
Thu Apr 15 07:00:31 CDT 2010


Hi Joerg,

2010/4/15  <Joerg-Cyril.Hoehle at t-systems.com>:
> Hi,
>
> any comment on that patch? It's currently the bottommost in
> source.winehq.org/patches hence may fall into the bitbucket anytime.
>
> I had noticed that the MCI MIDI player would busy loop while paused
> because of a while(xyz) ; statement therein.
>
> Test it using these MCI commands
> open c:\data\foo.mid alias m
> play m
> pause m
>
> So I simply added a Sleep() and wrote:
>>7 ms is arbitrary. It allows to sleep well yet be responsive enough
>>so the app doesn't wait too long should the next command be MCI_Stop.
>>For the ear, an even larger sleep would be good enough.

It would be better to signal an event object to wake up from sleep.

Cheers,
Maarten



More information about the wine-devel mailing list