[PATCH] Add Callback for wavemapper -> widOpen

James Hatheway james at macadamian.com
Wed Mar 21 12:26:31 CST 2001


Hi,

Currently, widOpen() in the wavemapper does not make use of its
own callback function.  Two handles are created, one for the
wavemapper layer and one for the wineoss layer.  The wavemapper
layer handle is returned to the app from the windows api call
waveInOpen.  The wineoss handle is returned to the app in
subsequent notifications (WIM_DATA, WIM_OPEN, WIM_CLOSE).
Since widOpen doesn't use its own callback, WineOSS calls back
directly into the application, with its own handle in the notification.
The app I am debugging caches the handle returned from the
waveInOpen API and stores it in a class member variable.
In its WIM_DATA message handler, the handle passed
in is compared to the member variable in an assertion.  They
aren't the same, so the app asserts (and sometimes crashes/freezes).

The wavemapper should make use of a callback function, WineOSS
should not be talking directly to the user-level application.
I noticed that wodOpen works in this way.  This patch changes
widOpen to use a callback function.



Changelog:
  James Hatheway - james at macadamian.com
  widOpen in the wavemapper should use a callback.

Modified:
  dlls/winmm/wavemap/wavemap.c



--
James Hatheway
Software Designer - Macadamian Technologies, Inc.
james at macadamian.com ~ http://www.macadamian.com

  "Man könnte froh sein, wenn die Luft so rein wäre wie das Bier"
  "One could be happy if the air were as pure as the beer"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wavemap_in_callback.diff
Type: application/octet-stream
Size: 2171 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20010321/2d646285/wavemap_in_callback.obj


More information about the wine-patches mailing list