Must multimedia players check the message queue and invoke DispatchMessage?

Juan Lang juan.lang at
Tue Mar 22 11:52:44 CDT 2011

> None of Wine's MCI drivers do.
> Who could shed some light?

Have you looked at any open source MCI drivers?  They may or may not
be of the best quality, but at least one exists in my brief perusal:
the MediaXW package,

> What do you mean exactly by "message pumping"? There are a few places in Wine
> that call PeekMessage e.g. MCI_DefYieldProc, MMSYSTEM_MidiStream_MessageHandler,
> but to me it looks like an error when that is not accompanied by DispatchMessageA/W
> of all the messages that the local handler does not understand.
> I'd expect DispatchMessage, not PeekMessage to invoke all the callbacks.
> Isn't it an error for all loops executing on the app's thread?

It's a broad topic, but yes, basically you want to call
DispatchMessage on some messages periodically.  See e.g.

More information about the wine-devel mailing list