WMME code fix.

Rewritten the callback to use an event instead of a function --
deadlocks fixed.