[PATCH 06/13] winmm: Implement waveOut* on top of MMDevAPI

Andrew Eikum aeikum at codeweavers.com
Thu Jun 23 13:12:25 CDT 2011


Since there's a lot of code in this patch, I'll point out some
especially important parts for review.

To manage the MMDevAPI devices, a thread is created at the first entry into
any of the waveOut* functions. This thread is used to create and destroy
COM objects, since the client thread may not have been CoInitialized.
This thread is also used to periodically push data to and pull data from
the MMDevAPI objects.

The device thread is created in WINMM_StartDevicesThread(). This
function is called from every waveOut* entry point. Initialization of
the local data happens in WINMM_DevicesThreadProc(), which also enters
the event loop after initialization. The loop executes every time a
device's event is set by MMDevAPI, signalling that data must be
transferred, or when a message is sent from
WINMM_SendDeviceThreadMessage(), which tells the thread to create or
destroy the MMDevAPI objects.

It's also worth pointing out that I have not removed any of the old
winmm driver code from the mmdevapi-supporting drivers. This is to
retain support for dsound hardware acceleration mode, where much of the
dsound-related code is intertwined with the winmm-related code.  After
dsound has been converted to talk directly with mmdevapi, we can begin
detangling the old waveform code from the MIDI-support code and purging
it.
---
  dlls/winmm/Makefile.in |    2 +-
  dlls/winmm/waveform.c  | 2121 
++++++++++++++++++++++++++++++++++++++++++++++--
  dlls/winmm/winemm.h    |    2 +
  dlls/winmm/winmm.c     |    2 +-
  4 files changed, 2039 insertions(+), 88 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-winmm-Implement-waveOut-on-top-of-MMDevAPI.patch
Type: text/x-patch
Size: 68182 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110623/98d1ee88/attachment-0001.bin>


More information about the wine-patches mailing list