Index: trunk/src/winmm/auxos2.cpp
===================================================================
--- trunk/src/winmm/auxos2.cpp	(revision 7195)
+++ trunk/src/winmm/auxos2.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: auxos2.cpp,v 1.8 2000-02-17 14:09:30 sandervl Exp $ */
+/* $Id: auxos2.cpp,v 1.9 2001-10-24 22:47:41 sandervl Exp $ */
 
 /*
@@ -28,4 +28,5 @@
 
 #include "auxiliary.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG	DBG_auxos2
@@ -41,4 +42,6 @@
  APIRET rc;
 
+  if(fMMPMAvailable == FALSE) return FALSE;
+
   if(auxDeviceId != -1) {
         return TRUE;
@@ -50,5 +53,5 @@
   AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX;
 
-  rc = mciSendCommand(0, MCI_OPEN,
+  rc = mymciSendCommand(0, MCI_OPEN,
                       MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
                       (PVOID) &AmpOpenParms,
@@ -74,5 +77,5 @@
 
    // Close the device
-   mciSendCommand(auxDeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
+   mymciSendCommand(auxDeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
 }
 /******************************************************************************/
@@ -84,5 +87,5 @@
 
   maudio.ulMasterVolume = (dwVolume*100)/65536;  //TODO: Not correct, should be logartihmic
-  rc = mciSendCommand(auxDeviceId, MCI_MASTERAUDIO, MCI_MASTERVOL |
+  rc = mymciSendCommand(auxDeviceId, MCI_MASTERAUDIO, MCI_MASTERVOL |
                       MCI_WAIT, (PVOID)&maudio,0);
   if(rc) {
@@ -98,5 +101,5 @@
  APIRET rc;
 
-  rc = mciSendCommand(auxDeviceId, MCI_MASTERAUDIO, MCI_QUERYCURRENTSETTING |
+  rc = mymciSendCommand(auxDeviceId, MCI_MASTERAUDIO, MCI_QUERYCURRENTSETTING |
                       MCI_MASTERVOL | MCI_WAIT, (PVOID)&maudio,0);
   if(rc) {
Index: trunk/src/winmm/initwinmm.cpp
===================================================================
--- trunk/src/winmm/initwinmm.cpp	(revision 7195)
+++ trunk/src/winmm/initwinmm.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: initwinmm.cpp,v 1.3 2001-09-05 10:30:21 bird Exp $
+/* $Id: initwinmm.cpp,v 1.4 2001-10-24 22:47:41 sandervl Exp $
  *
  * WINMM DLL entry point
@@ -28,5 +28,8 @@
 #define  INCL_DOSPROCESS
 #define  INCL_DOSSEMAPHORES
-#include <os2wrap.h>    //Odin32 OS/2 api wrappers
+#define  INCL_DOSERRORS
+#define  INCL_OS2MM
+#include <os2wrap.h>   //Odin32 OS/2 api wrappers
+#include <os2mewrap.h> //Odin32 OS/2 MMPM/2 api wrappers
 #include <stdlib.h>
 #include <stdio.h>
@@ -43,4 +46,5 @@
 #include "waveoutbase.h"
 #include <win\options.h>
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_initterm
@@ -58,4 +62,16 @@
 }
 static HMODULE dllHandle = 0;
+static HMODULE MMPMLibraryHandle = 0;
+
+BOOL fMMPMAvailable = FALSE;
+
+DWORD (APIENTRY *pfnmciSendCommand)(WORD   wDeviceID,
+                                   WORD   wMessage,
+                                   DWORD  dwParam1,
+                                   PVOID  dwParam2,
+                                   WORD   wUserParm) = NULL;
+DWORD (APIENTRY *pfnmciGetErrorString)(DWORD   dwError,
+                                      LPSTR   lpstrBuffer,
+                                      WORD    wLength) = NULL;
 
 //******************************************************************************
@@ -63,5 +79,6 @@
 BOOL WINAPI LibMainWinmm(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
 {
-  static BOOL           bInitDone = FALSE;
+  static BOOL bInitDone = FALSE;
+  char   szError[CCHMAXPATH];
 
   switch (fdwReason)
@@ -85,4 +102,41 @@
         dwVolume = (dwVolume << 16) | dwVolume;
         WaveOut::setDefaultVolume(dwVolume);
+
+        // try to load the MDM library, not MMPM directly!!!
+        if (DosLoadModule(szError, sizeof(szError),
+                          "MDM.DLL", &MMPMLibraryHandle) != NO_ERROR)
+        {
+            // this system has no MMPM :-(
+            fMMPMAvailable = FALSE;
+        } 
+        else
+        {
+            /* detect if MMPM is available */
+            if (DosQueryProcAddr(MMPMLibraryHandle,
+                                 1, /* ORD_MCISENDCOMMAND */
+                                 NULL,
+                                (PFN*)&pfnmciSendCommand) != NO_ERROR)
+            {
+                fMMPMAvailable = FALSE;
+            } 
+            else
+            {
+                fMMPMAvailable = TRUE;
+            }
+
+            /* see if we can get the address for the mciGetErrorString function */
+            if (fMMPMAvailable == TRUE)
+            {
+                if (DosQueryProcAddr(MMPMLibraryHandle,
+                                     3, /* ORD_MCIGETERRORSTRING */
+                                     NULL,
+                                     (PFN*)&pfnmciGetErrorString) != NO_ERROR)
+                    pfnmciGetErrorString = NULL;
+            }
+            dprintf(("MMPM/2 is available; hmod %x", MMPMLibraryHandle));
+            dprintf(("mciSendCommand    %x", pfnmciSendCommand));
+            dprintf(("mciGetErrorString %x", pfnmciGetErrorString));
+        }
+
         return TRUE;
    }
@@ -96,4 +150,6 @@
         auxOS2Close(); /* SvL: Close aux device if necessary */
         IRTMidiShutdown;  /* JT: Shutdown RT Midi subsystem, if running. */
+
+        if(MMPMLibraryHandle) DosFreeModule(MMPMLibraryHandle);
         return TRUE;
    }
@@ -144,5 +200,34 @@
 //******************************************************************************
 //******************************************************************************
-
-
-
+DWORD APIENTRY mymciSendCommand(WORD   wDeviceID,
+                                WORD   wMessage,
+                                DWORD  dwParam1,
+                                PVOID  dwParam2,
+                                WORD   wUserParm)
+{
+    if(pfnmciSendCommand == NULL) {
+        DebugInt3();
+        return MCIERR_CANNOT_LOAD_DRIVER;
+    }
+    USHORT sel = GetFS();
+    DWORD ret = pfnmciSendCommand(wDeviceID, wMessage, dwParam1, dwParam2, wUserParm);
+    SetFS(sel);
+    return ret;
+}
+//******************************************************************************
+//******************************************************************************
+DWORD APIENTRY mymciGetErrorString(DWORD   dwError,
+                                   LPSTR   lpstrBuffer,
+                                   WORD    wLength)
+{
+    if(pfnmciGetErrorString == NULL) {
+        DebugInt3();
+        return MCIERR_CANNOT_LOAD_DRIVER;
+    }
+    USHORT sel = GetFS();
+    DWORD ret = pfnmciGetErrorString(dwError, lpstrBuffer, wLength);
+    SetFS(sel);
+    return ret;
+}
+//******************************************************************************
+//******************************************************************************
Index: trunk/src/winmm/initwinmm.h
===================================================================
--- trunk/src/winmm/initwinmm.h	(revision 7196)
+++ trunk/src/winmm/initwinmm.h	(revision 7196)
@@ -0,0 +1,16 @@
+#ifndef __INITWINMM_H__
+#define __INITWINMM_H__
+
+extern BOOL fMMPMAvailable;
+
+DWORD APIENTRY mymciSendCommand(WORD   wDeviceID,
+                                    WORD   wMessage,
+                                    DWORD  dwParam1,
+                                    PVOID  dwParam2,
+                                    WORD   wUserParm);
+DWORD APIENTRY mymciGetErrorString(DWORD   dwError,
+                                    LPSTR   lpstrBuffer,
+                                    WORD    wLength);
+
+
+#endif //__INITWINMM_H__
Index: trunk/src/winmm/wavein.cpp
===================================================================
--- trunk/src/winmm/wavein.cpp	(revision 7195)
+++ trunk/src/winmm/wavein.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: wavein.cpp,v 1.9 2001-03-23 16:23:44 sandervl Exp $ */
+/* $Id: wavein.cpp,v 1.10 2001-10-24 22:47:42 sandervl Exp $ */
 
 /*
@@ -29,4 +29,5 @@
 #include "winmm.h"
 #include "waveindart.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_wavein
@@ -47,4 +48,6 @@
 {
   MMRESULT rc;
+
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
 
     if(pwfx == NULL)
@@ -250,4 +253,6 @@
               UINT, cbwic)
 {
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
+
     if(DartWaveIn::getNumDevices() == 0) {
         memset(pwic, 0, sizeof(*pwic));
@@ -279,4 +284,6 @@
               UINT, cbwic)
 {
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
+
     if(DartWaveIn::getNumDevices() == 0) {
         memset(pwic, 0, sizeof(*pwic));
Index: trunk/src/winmm/waveindart.cpp
===================================================================
--- trunk/src/winmm/waveindart.cpp	(revision 7195)
+++ trunk/src/winmm/waveindart.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: waveindart.cpp,v 1.1 2001-03-23 16:23:44 sandervl Exp $ */
+/* $Id: waveindart.cpp,v 1.2 2001-10-24 22:47:42 sandervl Exp $ */
 
 /*
@@ -31,4 +31,5 @@
 #include "misc.h"
 #include "waveindart.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_waveindart
@@ -76,5 +77,5 @@
     AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX;
 
-    rc = mciSendCommand(0, MCI_OPEN,
+    rc = mymciSendCommand(0, MCI_OPEN,
                        MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
                        (PVOID) &AmpOpenParms,
@@ -89,5 +90,5 @@
         //Grab exclusive rights to device instance (NOT entire device)
         GenericParms.hwndCallback = 0;  //Not needed, so set to 0
-        rc = mciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE,
+        rc = mymciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE,
                             (PVOID)&GenericParms, 0);
         if(rc) {
@@ -115,7 +116,7 @@
 
         // Stop recording.
-        mciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0);
-
-        mciSendCommand(DeviceId,
+        mymciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0);
+
+        mymciSendCommand(DeviceId,
                       MCI_BUFFER,
                       MCI_WAIT | MCI_DEALLOCATE_MEMORY,
@@ -127,5 +128,5 @@
 
         // Close the device
-        mciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
+        mymciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
     }
     if(!ulError)
@@ -179,5 +180,5 @@
         MixSetupParms->pmixEvent    = WaveInHandler;
 
-        rc = mciSendCommand(DeviceId,
+        rc = mymciSendCommand(DeviceId,
                             MCI_MIXSETUP,
                             MCI_WAIT | MCI_MIXSETUP_INIT,
@@ -187,5 +188,5 @@
         if ( rc != MCIERR_SUCCESS ) {
             mciError(rc);
-            mciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
+            mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
                            (PVOID)&GenericParms, 0);
             return(MMSYSERR_NOTSUPPORTED);
@@ -224,5 +225,5 @@
         }
 
-        rc = mciSendCommand(DeviceId,
+        rc = mymciSendCommand(DeviceId,
                             MCI_BUFFER,
                             MCI_WAIT | MCI_ALLOCATE_MEMORY,
@@ -232,5 +233,5 @@
         if(ULONG_LOWD(rc) != MCIERR_SUCCESS) {
             mciError(rc);
-            mciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
+            mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
                           (PVOID)&GenericParms, 0);
             return(MMSYSERR_NOTSUPPORTED);
@@ -242,5 +243,5 @@
         memset( &ConnectorParms, '\0', sizeof( MCI_CONNECTOR_PARMS ) );
         ConnectorParms.ulConnectorType = MCI_LINE_IN_CONNECTOR;
-        rc = mciSendCommand( DeviceId,
+        rc = mymciSendCommand( DeviceId,
                              MCI_CONNECTOR,
                              MCI_WAIT |
@@ -255,5 +256,5 @@
         memset( &AmpSetParms, '\0', sizeof( MCI_AMP_SET_PARMS ) );
         AmpSetParms.ulItem = MCI_AMP_SET_MONITOR;
-        rc = mciSendCommand(DeviceId,
+        rc = mymciSendCommand(DeviceId,
                             MCI_SET,
                             MCI_WAIT | MCI_SET_ON | MCI_SET_ITEM,
@@ -305,5 +306,5 @@
 
     // Stop recording.
-    mciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
+    mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
 
     return(MMSYSERR_NOERROR);
@@ -323,5 +324,5 @@
 
     // Stop recording
-    mciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
+    mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
 
     dprintf(("Nr of threads blocked on mutex = %d\n", wmutex.getNrBlocked()));
@@ -378,5 +379,5 @@
 
     mciStatus.ulItem = MCI_STATUS_POSITION;
-    rc = mciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0);
+    rc = mymciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0);
     if((rc & 0xFFFF) == MCIERR_SUCCESS) {
         nrbytes = (mciStatus.ulReturn * (getAvgBytesPerSecond()/1000));
@@ -400,5 +401,5 @@
    AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX;
 
-   rc = mciSendCommand(0, MCI_OPEN,
+   rc = mymciSendCommand(0, MCI_OPEN,
                        MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
                        (PVOID) &AmpOpenParms,
@@ -413,5 +414,5 @@
 
    // Close the device
-   mciSendCommand(AmpOpenParms.usDeviceID, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
+   mymciSendCommand(AmpOpenParms.usDeviceID, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
 
    return 1;
@@ -437,5 +438,5 @@
   mciOpenParms.pszDeviceType = (PSZ)MCI_DEVTYPE_WAVEFORM_AUDIO;
 
-  rc = mciSendCommand( (USHORT) 0,
+  rc = mymciSendCommand( (USHORT) 0,
                        MCI_OPEN,
                        MCI_WAIT | MCI_OPEN_TYPE_ID,
@@ -457,5 +458,5 @@
   mciAudioCaps.ulItem          = MCI_GETDEVCAPS_WAVE_FORMAT;
 
-  rc = mciSendCommand(DeviceId,   /* Device ID    */
+  rc = mymciSendCommand(DeviceId,   /* Device ID    */
                       MCI_GETDEVCAPS,
                       MCI_WAIT | MCI_GETDEVCAPS_EXTENDED | MCI_GETDEVCAPS_ITEM,
@@ -469,5 +470,5 @@
 
   // Close the device
-  mciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0);
+  mymciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0);
   return(winrc);
 }
@@ -479,5 +480,5 @@
     char szError[256] = "";
 
-    mciGetErrorString(ulError, szError, sizeof(szError));
+    mymciGetErrorString(ulError, szError, sizeof(szError));
     dprintf(("WINMM: DartWaveIn: %s\n", szError));
 #endif
Index: trunk/src/winmm/waveout.cpp
===================================================================
--- trunk/src/winmm/waveout.cpp	(revision 7195)
+++ trunk/src/winmm/waveout.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: waveout.cpp,v 1.21 2001-03-24 15:40:04 sandervl Exp $ */
+/* $Id: waveout.cpp,v 1.22 2001-10-24 22:47:42 sandervl Exp $ */
 //#undef DEBUG
 /*
@@ -31,4 +31,5 @@
 #include "misc.h"
 #include "winmm.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_waveout
@@ -53,4 +54,6 @@
 {
   MMRESULT rc;
+
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
 
     if(pwfx == NULL)
@@ -275,4 +278,6 @@
               UINT, cbwoc)
 {
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
+
     if(WaveOut::getNumDevices() == 0) {
         memset(pwoc, 0, sizeof(*pwoc));
@@ -305,4 +310,6 @@
               UINT, cbwoc)
 {
+    if(fMMPMAvailable == FALSE) return MMSYSERR_NODRIVER;
+
     if(WaveOut::getNumDevices() == 0) {
         memset(pwoc, 0, sizeof(*pwoc));
@@ -331,4 +338,6 @@
 ODINFUNCTION0(UINT, waveOutGetNumDevs)
 {
+  if(fMMPMAvailable == FALSE) return 0;
+
   return WaveOut::getNumDevices();
 }
Index: trunk/src/winmm/waveoutbase.cpp
===================================================================
--- trunk/src/winmm/waveoutbase.cpp	(revision 7195)
+++ trunk/src/winmm/waveoutbase.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: waveoutbase.cpp,v 1.3 2001-06-16 11:35:22 sandervl Exp $ */
+/* $Id: waveoutbase.cpp,v 1.4 2001-10-24 22:47:42 sandervl Exp $ */
 
 /*
@@ -33,4 +33,5 @@
 #include "misc.h"
 #include "waveoutbase.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_waveoutbase
@@ -76,5 +77,5 @@
    AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX;
 
-   rc = mciSendCommand(0, MCI_OPEN,
+   rc = mymciSendCommand(0, MCI_OPEN,
                        MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
                        (PVOID) &AmpOpenParms,
@@ -89,5 +90,5 @@
 
    // Close the device
-   mciSendCommand(AmpOpenParms.usDeviceID, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
+   mymciSendCommand(AmpOpenParms.usDeviceID, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
 
    return 1;
Index: trunk/src/winmm/waveoutdart.cpp
===================================================================
--- trunk/src/winmm/waveoutdart.cpp	(revision 7195)
+++ trunk/src/winmm/waveoutdart.cpp	(revision 7196)
@@ -1,3 +1,3 @@
-/* $Id: waveoutdart.cpp,v 1.5 2001-06-16 11:35:22 sandervl Exp $ */
+/* $Id: waveoutdart.cpp,v 1.6 2001-10-24 22:47:42 sandervl Exp $ */
 
 /*
@@ -35,4 +35,5 @@
 #include "misc.h"
 #include "waveoutdart.h"
+#include "initwinmm.h"
 
 #define DBG_LOCALLOG    DBG_waveoutdart
@@ -80,5 +81,5 @@
     AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX;
 
-    rc = mciSendCommand(0, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
+    rc = mymciSendCommand(0, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,
                        (PVOID) &AmpOpenParms, 0);
 
@@ -92,5 +93,5 @@
         //Grab exclusive rights to device instance (NOT entire device)
         GenericParms.hwndCallback = 0;  //Not needed, so set to 0
-        rc = mciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE,
+        rc = mymciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE,
                             (PVOID)&GenericParms, 0);
         if(rc) {
@@ -118,7 +119,7 @@
 
         // Stop the playback.
-        mciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0);
-
-        mciSendCommand(DeviceId, MCI_BUFFER,
+        mymciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0);
+
+        mymciSendCommand(DeviceId, MCI_BUFFER,
                        MCI_WAIT | MCI_DEALLOCATE_MEMORY,
                        (PVOID)&BufferParms, 0);
@@ -128,5 +129,5 @@
 
         // Close the device
-        mciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
+        mymciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);
     }
 
@@ -173,5 +174,5 @@
         MixSetupParms->pmixEvent    = WaveOutHandler;
 
-        rc = mciSendCommand(DeviceId,
+        rc = mymciSendCommand(DeviceId,
                             MCI_MIXSETUP,
                             MCI_WAIT | MCI_MIXSETUP_INIT,
@@ -181,5 +182,5 @@
         if ( rc != MCIERR_SUCCESS ) {
             mciError(rc);
-            mciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
+            mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
                            (PVOID)&GenericParms, 0);
             return(MMSYSERR_NOTSUPPORTED);
@@ -217,5 +218,5 @@
         }
 
-        rc = mciSendCommand(DeviceId,
+        rc = mymciSendCommand(DeviceId,
                             MCI_BUFFER,
                             MCI_WAIT | MCI_ALLOCATE_MEMORY,
@@ -225,5 +226,5 @@
         if(ULONG_LOWD(rc) != MCIERR_SUCCESS) {
             mciError(rc);
-            mciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
+            mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,
                           (PVOID)&GenericParms, 0);
             return(MMSYSERR_NOTSUPPORTED);
@@ -303,5 +304,5 @@
 
             // Resume the playback.
-            mciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&GenericParms, 0);
+            mymciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&GenericParms, 0);
 
             //write buffers to DART; starts playback
@@ -337,5 +338,5 @@
 
     // Pause the playback.
-    mciSendCommand(DeviceId, MCI_PAUSE, MCI_WAIT, (PVOID)&Params, 0);
+    mymciSendCommand(DeviceId, MCI_PAUSE, MCI_WAIT, (PVOID)&Params, 0);
 
     return(MMSYSERR_NOERROR);
@@ -354,5 +355,5 @@
 
     // Stop the playback.
-    mciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
+    mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
 
     State     = STATE_STOPPED;
@@ -378,5 +379,5 @@
 
     // Stop the playback.
-    mciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
+    mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);
 
     dprintf(("Nr of threads blocked on mutex = %d\n", wmutex.getNrBlocked()));
@@ -450,5 +451,5 @@
 
     mciStatus.ulItem = MCI_STATUS_POSITION;
-    rc = mciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0);
+    rc = mymciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0);
     if((rc & 0xFFFF) == MCIERR_SUCCESS) {
         nrbytes = (mciStatus.ulReturn * (getAvgBytesPerSecond()/1000));
@@ -478,5 +479,5 @@
     mciOpenParms.pszDeviceType = (PSZ)MCI_DEVTYPE_WAVEFORM_AUDIO;
 
-    rc = mciSendCommand( (USHORT) 0,
+    rc = mymciSendCommand( (USHORT) 0,
                         MCI_OPEN,
                         MCI_WAIT | MCI_OPEN_TYPE_ID,
@@ -498,5 +499,5 @@
     mciAudioCaps.ulItem          = MCI_GETDEVCAPS_WAVE_FORMAT;
 
-    rc = mciSendCommand(DeviceId,   /* Device ID    */
+    rc = mymciSendCommand(DeviceId,   /* Device ID    */
                         MCI_GETDEVCAPS,
                         MCI_WAIT | MCI_GETDEVCAPS_EXTENDED | MCI_GETDEVCAPS_ITEM,
@@ -510,5 +511,5 @@
 
     // Close the device
-    mciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0);
+    mymciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0);
     return(winrc);
 }
@@ -520,5 +521,5 @@
     char szError[256] = "";
 
-    mciGetErrorString(ulError, szError, sizeof(szError));
+    mymciGetErrorString(ulError, szError, sizeof(szError));
     dprintf(("WINMM: DartWaveOut: %s\n", szError));
 #endif
@@ -714,5 +715,5 @@
   msp.ulLevel = ulVolL;
 
-  mciSendCommand(DeviceId, MCI_SET,
+  mymciSendCommand(DeviceId, MCI_SET,
                  MCI_WAIT | MCI_SET_AUDIO | MCI_SET_VOLUME,
                  &msp, 0);
@@ -726,5 +727,5 @@
 #endif
 
-  mciSendCommand(DeviceId, MCI_SET,
+  mymciSendCommand(DeviceId, MCI_SET,
                  MCI_WAIT | MCI_SET_AUDIO | MCI_SET_VOLUME,
                  &msp, 0);
Index: trunk/src/winmm/winmm.mak
===================================================================
--- trunk/src/winmm/winmm.mak	(revision 7195)
+++ trunk/src/winmm/winmm.mak	(revision 7196)
@@ -1,3 +1,3 @@
-# $Id: winmm.mak,v 1.7 2001-09-30 09:19:44 bird Exp $
+# $Id: winmm.mak,v 1.8 2001-10-24 22:47:43 sandervl Exp $
 
 #
@@ -56,5 +56,4 @@
 #
 LIBS = \
-mmpm2.lib \
 $(ODIN32_LIB)/kernel32.lib \
 $(ODIN32_LIB)/user32.lib \
