[PATCH 20/25] mciseq: Check stop condition after sleeping. (Try 2)
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Wed Oct 10 03:20:46 CDT 2012
Hi,
Stop and Pause events will most often occur while the player is sleeping, not running.
Instead of playing a final note before aborting at the top of the loop,
check the conditions when waking up.
Now a local status = wmm->dwStatus cache is used. Incidentally, that's David Laight's suggestion too.
+ status = wmm->dwStatus;
+ if (status == MCI_MODE_PAUSE)
+ continue;
+ else if (status != MCI_MODE_PLAY)
+ break;
Now the code shall do what reading it suggests, with and without optimisation or if dispatched out amid execution.
As I mentioned, the player need not react immediately to status changes. The others are patiently
waiting if needed. All that matters is that the player eventually stops.
Regards,
Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mciseq-Check-stop-condition-after-sleeping.patch
Type: application/octet-stream
Size: 2315 bytes
Desc: 0001-mciseq-Check-stop-condition-after-sleeping.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121010/a2eef5a4/attachment.obj>
More information about the wine-patches
mailing list