[PATCH 2/9 (try5)] winmm: Implement waveOut* on top of MMDevAPI
aeikum at codeweavers.com
Mon Jul 11 08:28:30 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
dlls/winmm/Makefile.in | 2 +-
dlls/winmm/waveform.c | 2020
dlls/winmm/winemm.h | 2 +
dlls/winmm/winmm.c | 2 +-
4 files changed, 1981 insertions(+), 45 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 66753 bytes
Desc: not available
More information about the wine-patches