Index: trunk/src/dsound/new/.DEPEND
===================================================================
--- trunk/src/dsound/new/.DEPEND	(revision 3043)
+++ 	(revision )
@@ -1,325 +1,0 @@
-dart.obj: \
-     dart.cpp \
-     ..\..\include\os2wrap.h \
-     ..\..\include\os2mewrap.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     .\dart.h \
-     .\dsmixer.h \
-     ..\..\include\misc.h
-
-dsmixer.obj: \
-     dsmixer.cpp \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\win\dsound.h \
-     .\os2dsound.h \
-     .\os2sndbuffer.h \
-     .\os2notify.h \
-     ..\..\include\misc.h
-
-DSOUND.obj: \
-     DSOUND.CPP \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\stdio.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\win\dsound.h \
-     .\os2dsound.h \
-     ..\..\include\misc.h
-
-initterm.obj: \
-     initterm.cpp \
-     ..\..\include\os2wrap.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\stdio.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\odin.h \
-     ..\..\include\win32type.h \
-     ..\..\include\winconst.h \
-     ..\..\include\odinlx.h \
-     ..\..\include\misc.h
-
-misc.obj: \
-     misc.cpp \
-     ..\..\include\os2wrap.h \
-     D:\IBMCPP\INCLUDE\stdio.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     D:\IBMCPP\INCLUDE\stdarg.h \
-     ..\..\include\misc.h \
-     .\initterm.h \
-     D:\IBMCPP\INCLUDE\stddef.h \
-     D:\IBMCPP\INCLUDE\time.h
-
-OS2DSOUND.obj: \
-     OS2DSOUND.CPP \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\win\dsound.h \
-     .\os2dsound.h \
-     .\os2sndbuffer.h \
-     .\os2primbuff.h \
-     .\os2notify.h \
-     ..\..\include\misc.h
-
-os2helper.obj: \
-     os2helper.cpp \
-     ..\..\include\os2wrap.h \
-     ..\..\include\misc.h \
-     .\asmutil.h
-
-OS2NOTIFY.obj: \
-     OS2NOTIFY.CPP \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\win\dsound.h \
-     .\os2dsound.h \
-     .\os2sndbuffer.h \
-     .\os2notify.h \
-     ..\..\include\misc.h
-
-OS2PrimBuff.obj: \
-     OS2PrimBuff.cpp \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdio.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     ..\..\include\win\dsound.h \
-     ..\..\include\win\DSound.h \
-     .\OS2DSound.h \
-     .\OS2SndBuffer.h \
-     .\OS2PrimBuff.h \
-     .\dart.h
-
-OS2SNDBUFFER.obj: \
-     OS2SNDBUFFER.CPP \
-     ..\..\include\os2win.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\string.h \
-     D:\IBMCPP\INCLUDE\math.h \
-     ..\..\include\win\dsound.h \
-     .\os2dsound.h \
-     .\os2sndbuffer.h \
-     .\os2primbuff.h \
-     .\os2notify.h \
-     ..\..\include\misc.h
-
-asmutil.h:
-
-Dart.h:
-
-dsmixer.h:
-
-initterm.h:
-
-OS2DSOUND.H:
-
-OS2NOTIFY.H: \
-     ..\..\include\win\mmsystem.h
-
-OS2PrimBuff.h: \
-     ..\..\include\win\mmsystem.h
-
-OS2SNDBUFFER.H: \
-     ..\..\include\win\mmsystem.h
-
-asmutil.obj: \
-     asmutil.asm
-
-resource.obj: \
-     resource.asm
-
-..\..\include\codepage.h: \
-     E:\OS2TK45\H\uconv.h
-
-..\..\include\comtype.h:
-
-..\..\include\cpuhlp.h:
-
-..\..\include\dcdata.h:
-
-..\..\include\exceptions.h: \
-     ..\..\include\win32type.h \
-     ..\..\include\misc.h
-
-..\..\include\excpt.h:
-
-..\..\include\exitlist.h:
-
-..\..\include\HandleManager.h: \
-     ..\..\include\winos2def.h
-
-..\..\include\heap.h: \
-     ..\..\include\win\winbase.h
-
-..\..\include\heapcode.h: \
-     ..\..\include\heapshared.h
-
-..\..\include\heapshared.h: \
-     D:\IBMCPP\INCLUDE\stddef.h \
-     D:\IBMCPP\INCLUDE\stdlib.h \
-     D:\IBMCPP\INCLUDE\umalloc.h
-
-..\..\include\heapstring.h: \
-     ..\..\include\odin.h
-
-..\..\include\midimapr.h:
-
-..\..\include\misc.h: \
-     ..\..\include\win32type.h \
-     ..\..\include\versionos2.h \
-     ..\..\include\unicode.h
-
-..\..\include\nameid.h:
-
-..\..\include\odin.h: \
-     D:\IBMCPP\INCLUDE\builtin.h
-
-..\..\include\odinlx.h:
-
-..\..\include\odinrsrc.h:
-
-..\..\include\odinwrap.h: \
-     ..\..\include\os2sel.h \
-     D:\IBMCPP\INCLUDE\malloc.h
-
-..\..\include\os2mewrap.h: \
-     E:\OS2TK45\H\os2me.h
-
-..\..\include\os2newapi.h:
-
-..\..\include\os2sel.h:
-
-..\..\include\OS2WIN.H: \
-     ..\..\include\win32type.h \
-     ..\..\include\odin.h \
-     ..\..\include\win\windef.h \
-     ..\..\include\win\winbase.h \
-     ..\..\include\win\wingdi.h \
-     ..\..\include\win\winuser.h \
-     ..\..\include\win\winerror.h \
-     ..\..\include\win\commdlg.h \
-     ..\..\include\win\ddeml.h \
-     ..\..\include\win\mmsystem.h \
-     ..\..\include\os2sel.h \
-     ..\..\include\misc.h
-
-..\..\include\os2wrap.h: \
-     E:\OS2TK45\H\os2.h \
-     ..\..\include\os2sel.h \
-     ..\..\include\os2newapi.h
-
-..\..\include\pefile.h: \
-     E:\OS2TK45\H\os2.h \
-     ..\..\include\win32type.h \
-     ..\..\include\win\peexe.h \
-     D:\IBMCPP\INCLUDE\stdlib.h
-
-..\..\include\pmmenu.h:
-
-..\..\include\spy.h:
-
-..\..\include\unicode.h: \
-     ..\..\include\uniconv.h
-
-..\..\include\uniconv.h: \
-     D:\IBMCPP\INCLUDE\stddef.h \
-     D:\IBMCPP\INCLUDE\time.h
-
-..\..\include\versionos2.h:
-
-..\..\include\vmutex.h:
-
-..\..\include\win32type.h: \
-     ..\..\include\odin.h
-
-..\..\include\win32util.h:
-
-..\..\include\win32wnd.h:
-
-..\..\include\winaccel.h:
-
-..\..\include\winconst.h:
-
-..\..\include\wincursor.h:
-
-..\..\include\windll.h: \
-     ..\..\include\winimage.h
-
-..\..\include\windllbase.h: \
-     ..\..\include\winimagebase.h \
-     ..\..\include\odinlx.h
-
-..\..\include\windlllx.h: \
-     ..\..\include\windllbase.h \
-     ..\..\include\winimagelx.h
-
-..\..\include\windllpe2lx.h: \
-     ..\..\include\windllbase.h \
-     ..\..\include\winimagepe2lx.h
-
-..\..\include\windllpeldr.h: \
-     ..\..\include\windllbase.h \
-     ..\..\include\winimagepeldr.h
-
-..\..\include\wineuni.h:
-
-..\..\include\winexe.h: \
-     ..\..\include\winimage.h \
-     ..\..\include\windll.h
-
-..\..\include\winexebase.h: \
-     ..\..\include\winimagebase.h
-
-..\..\include\winexelx.h: \
-     ..\..\include\winexebase.h \
-     ..\..\include\winimagelx.h \
-     ..\..\include\odinlx.h
-
-..\..\include\winexepe2lx.h: \
-     ..\..\include\winexebase.h \
-     ..\..\include\winimagepe2lx.h
-
-..\..\include\winexepeldr.h: \
-     ..\..\include\winexebase.h \
-     ..\..\include\winimagepeldr.h
-
-..\..\include\winfakepeldr.h: \
-     ..\..\include\winimagepeldr.h
-
-..\..\include\winicon.h:
-
-..\..\include\winimage.h: \
-     ..\..\include\win\peexe.h \
-     D:\IBMCPP\INCLUDE\iostream.h \
-     D:\IBMCPP\INCLUDE\fstream.h
-
-..\..\include\winimagebase.h: \
-     ..\..\include\win\peexe.h
-
-..\..\include\winimagelx.h: \
-     ..\..\include\winimagebase.h
-
-..\..\include\winimagepe2lx.h: \
-     ..\..\include\winimagebase.h
-
-..\..\include\winimagepeldr.h: \
-     ..\..\include\winimagebase.h
-
-..\..\include\winkeyboard.h:
-
-..\..\include\winmenu.h:
-
-..\..\include\winos2def.h:
-
-..\..\include\winres.h:
-
-..\..\include\wprocess.h: \
-     ..\..\include\win\winprocess.h \
-     ..\..\include\winconst.h \
-     ..\..\include\win\thread.h
-
Index: trunk/src/dsound/new/OS2DSOUND.CPP
===================================================================
--- trunk/src/dsound/new/OS2DSOUND.CPP	(revision 3043)
+++ trunk/src/dsound/new/OS2DSOUND.CPP	(revision 3044)
@@ -1,3 +1,3 @@
-/* $Id: OS2DSOUND.CPP,v 1.1 2000-03-06 13:11:38 mike Exp $ */
+/* $Id: OS2DSOUND.CPP,v 1.2 2000-03-08 18:26:47 mike Exp $ */
 
 /*
@@ -21,8 +21,9 @@
 #include <dsound.h>
 
-#include "os2dsound.h"
-#include "os2sndbuffer.h"
-#include "os2primbuff.h"
-#include "os2notify.h"
+#include "OS2DSound.h"
+#include "OS2SndBuffer.h"
+#include "OS2PrimBuff.h"
+#include "OS23DListener.h"
+#include "OS2Notify.h"
 #include <misc.h>
 
Index: trunk/src/dsound/new/OS2NOTIFY.H
===================================================================
--- trunk/src/dsound/new/OS2NOTIFY.H	(revision 3043)
+++ trunk/src/dsound/new/OS2NOTIFY.H	(revision 3044)
@@ -9,6 +9,4 @@
 #ifndef __OS2NOTIFY_H__
 #define __OS2NOTIFY_H__
-
-#include <mmsystem.h>
 
 #undef THIS
@@ -48,10 +46,3 @@
 };
 
-//******************************************************************************
-//******************************************************************************
-HRESULT __stdcall SoundNotifyQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
-ULONG   __stdcall SoundNotifyAddRef(THIS);
-ULONG   __stdcall SoundNotifyRelease(THIS);
-HRESULT __stdcall SoundNotifySetNotificationPositions(THIS, DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies);
-
 #endif
Index: trunk/src/dsound/new/OS2PrimBuff.cpp
===================================================================
--- trunk/src/dsound/new/OS2PrimBuff.cpp	(revision 3043)
+++ trunk/src/dsound/new/OS2PrimBuff.cpp	(revision 3044)
@@ -46,6 +46,13 @@
 #include "OS2SndBuffer.h"
 #include "OS2PrimBuff.h"
+#include "OS23DListener.h"
 
 #include "dart.h"
+
+#undef THIS
+#define THIS VOID*This
+
+#undef THIS_
+#define THIS_ VOID*This,
 
 //******************************************************************************
@@ -85,4 +92,5 @@
    fPrimary   = TRUE;
    Referenced = 0;
+   listener   = NULL;
 
    lpfxFormat = (WAVEFORMATEX *)malloc(/*bufferdesc.lpwfxFormat->cbSize +*/ sizeof(WAVEFORMATEX));
@@ -128,16 +136,29 @@
 HRESULT WIN32API PrimBufQueryInterface(THIS, REFIID riid, LPVOID * ppvObj)
 {
+   dprintf(("DSOUND-PrimBuff: QueryInterface"));
+
    if (This == NULL) {
-     return DSERR_INVALIDPARAM;
+      return DSERR_INVALIDPARAM;
    }
    *ppvObj = NULL;
 
-   if (!IsEqualGUID(riid, IID_IDirectSoundBuffer))
-     return E_NOINTERFACE;
-
-   *ppvObj = This;
-
-   PrimBufAddRef(This);
-   return DS_OK;
+   if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {
+      *ppvObj = This;
+      PrimBufAddRef(This);
+      return DS_OK;
+   }
+
+
+   if (IsEqualGUID(riid, IID_IDirectSound3DListener)) {
+      OS2PrimBuff                *me = (OS2PrimBuff *)This;
+      OS2IDirectSound3DListener  *listener;
+
+      listener     = new OS2IDirectSound3DListener(me);
+      *ppvObj      = listener;
+      listener->Vtbl.AddRef((IDirectSound3DListener *)listener);
+      return DS_OK;
+   }
+
+   return E_NOINTERFACE;
 }
 
Index: trunk/src/dsound/new/OS2PrimBuff.h
===================================================================
--- trunk/src/dsound/new/OS2PrimBuff.h	(revision 3043)
+++ trunk/src/dsound/new/OS2PrimBuff.h	(revision 3044)
@@ -18,5 +18,6 @@
 #define THIS_ VOID*This,
 
-
+// a forward declaration is needed here
+class OS2IDirectSound3DListener;
 
 class OS2PrimBuff: public OS2IDirectSoundBuffer
@@ -29,6 +30,10 @@
     int     Referenced;
     inline  HRESULT       GetLastError()    { return lastError;    };
+    inline  void          Set3DListener(OS2IDirectSound3DListener *_listener) {
+                                            listener = _listener; };
 
  private:
+ protected:
+
     void *vpMixBuffer;
     void *vpMixSetup;
@@ -42,5 +47,6 @@
     long  channels;// Number of Channels 1 or 2 MONO/Stereo
 
- protected:
+    OS2IDirectSound3DListener* listener;  // pointer to the associated 3DListener object
+
     HRESULT lastError;
 
Index: trunk/src/dsound/new/OS2SNDBUFFER.CPP
===================================================================
--- trunk/src/dsound/new/OS2SNDBUFFER.CPP	(revision 3043)
+++ trunk/src/dsound/new/OS2SNDBUFFER.CPP	(revision 3044)
@@ -1,3 +1,3 @@
-/* $Id: OS2SNDBUFFER.CPP,v 1.1 2000-03-06 13:11:39 mike Exp $ */
+/* $Id: OS2SNDBUFFER.CPP,v 1.2 2000-03-08 18:26:47 mike Exp $ */
 
 /*
@@ -25,8 +25,10 @@
 #include <dsound.h>
 
-#include "os2dsound.h"
-#include "os2sndbuffer.h"
-#include "os2primbuff.h"
-#include "os2notify.h"
+#include "OS2DSound.h"
+#include "OS2SndBuffer.h"
+#include "OS2PrimBuff.h"
+#include "OS23DListener.h"
+#include "OS23DBuffer.h"
+#include "OS2Notify.h"
 #include <misc.h>
 
@@ -226,4 +228,15 @@
       return DS_OK;
    }
+
+   if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {
+      OS2IDirectSoundBuffer   *me     = (OS2IDirectSoundBuffer *)This;
+      OS2IDirectSound3DBuffer *buffer3D;
+
+      buffer3D   = new OS2IDirectSound3DBuffer(me);
+      *ppvObj    = buffer3D;
+      buffer3D->Vtbl.AddRef((IDirectSound3DBuffer *)buffer3D);
+      return DS_OK;
+   }
+
    return E_NOINTERFACE;
 }
Index: trunk/src/dsound/new/OS2SNDBUFFER.H
===================================================================
--- trunk/src/dsound/new/OS2SNDBUFFER.H	(revision 3043)
+++ trunk/src/dsound/new/OS2SNDBUFFER.H	(revision 3044)
@@ -1,3 +1,3 @@
-/* $Id: OS2SNDBUFFER.H,v 1.1 2000-03-06 13:11:39 mike Exp $ */
+/* $Id: OS2SNDBUFFER.H,v 1.2 2000-03-08 18:26:48 mike Exp $ */
 
 /*
@@ -12,6 +12,4 @@
 #define __OS2SNDBUFFER_H__
 
-#include <mmsystem.h>
-
 #undef THIS
 #define THIS VOID*This
@@ -20,6 +18,7 @@
 #define THIS_ VOID*This,
 
-// a forward declaration of the Notify class is needed here!
+// a forward declaration of some classes is needed here!
 class OS2IDirectSoundNotify;
+class OS2IDirectSound3DBuffer;
 
 class OS2IDirectSoundBuffer
@@ -40,4 +39,6 @@
     inline  void          SetNotify(OS2IDirectSoundNotify *_notify) {
                                     notify = _notify; };
+    inline  void          Set3DBuffer(OS2IDirectSound3DBuffer *_buffer3D) {
+                                      buffer3D = _buffer3D; };
  private:
 
@@ -61,6 +62,7 @@
     char *lpBuffer;            // sound data
 
-    OS2IDirectSoundNotify* notify;  // pointer to the associated Notify object (if exists)
-    OS2IDirectSound*       parentDS;
+    OS2IDirectSoundNotify*   notify;    // pointer to the associated Notify object (if exists)
+    OS2IDirectSound3DBuffer* buffer3D;  // pointer to the associated 3DBuffer object (if exists)
+    OS2IDirectSound*         parentDS;
 
               // Linked list management
Index: trunk/src/dsound/new/dart.cpp
===================================================================
--- trunk/src/dsound/new/dart.cpp	(revision 3043)
+++ trunk/src/dsound/new/dart.cpp	(revision 3044)
@@ -25,4 +25,5 @@
 static long               lLastBuff;
 static char               *pDSoundBuff;
+static BOOL               fIsPlaying = FALSE;
 
 USHORT               usDeviceID;                 /* Amp Mixer device id          */
@@ -70,8 +71,11 @@
    MCI_AMP_OPEN_PARMS  AmpOpenParms;
    //MCI_WAVE_SET_PARMS WaveSetParms;
-   ULONG   rc;
+   ULONG   rc, ulNew;
+   LONG    lAdd = 5;
    short   device = 0;
 
    dprintf(("DSOUND-DART: Dart_Open_Device"));
+
+   DosSetRelMaxFH(&lAdd, &ulNew);
 
    *vpMixBuffer    = &MixBuffers;
@@ -175,4 +179,5 @@
    MCI_MIXSETUP_PARMS  *MixSetup;
    MCI_BUFFER_PARMS    *BufferParms;
+   ULONG               rc;
 
    dprintf(("DSOUND-DART: Dart_Close_Device"));
@@ -182,12 +187,12 @@
    BufferParms = (MCI_BUFFER_PARMS*)vpBuffParms;
 
-    if (MixBuffer->pBuffer) {
-       mciSendCommand(usDeviceID,MCI_BUFFER,MCI_WAIT|MCI_DEALLOCATE_MEMORY, BufferParms,0);
-       MixBuffer->pBuffer=NULL;
-    }
-    if (usDeviceID) {
-        mciSendCommand(usDeviceID,MCI_CLOSE,MCI_WAIT, NULL, 0);
-        usDeviceID=0;
-    }
+   rc = mciSendCommand(usDeviceID, MCI_BUFFER, MCI_WAIT | MCI_DEALLOCATE_MEMORY, BufferParms, 0);
+   if (rc != MCIERR_SUCCESS) {
+      dprintf(("DSOUND-DART: MCI_BUFFER (Close) %d", rc));
+   }
+   rc = mciSendCommand(usDeviceID, MCI_CLOSE, MCI_WAIT, NULL, 0);
+   if (rc != MCIERR_SUCCESS) {
+      dprintf(("DSOUND-DART: MCI_CLOSE (Close) %d", rc));
+   }
 
    dprintf(("DSOUND-DART: Dart_Close_Device returning DS_OK"));
@@ -301,4 +306,20 @@
    }
 
+   /* If the primary buffer was playing, we have to restart it!! */
+   if (fIsPlaying) {
+      dprintf(("DSOUND-DART: Restarting playback!!!!"));
+
+      /* Mix the first buffer before playing */
+      MixCallback(BUFFER_SIZE/NUM_DART_BUFFS);
+      memcpy(pMixBuffs[lLastBuff].pBuffer, &pDSoundBuff[lLastBuff*(BUFFER_SIZE/NUM_DART_BUFFS)], BUFFER_SIZE/NUM_DART_BUFFS);
+
+      USHORT  sel = RestoreOS2FS();
+      /* Note: the call to pmixWrite trashes the FS selector, we have to save */
+      /* and then restore FS!!! Otherwise exception handling will be broken.  */
+      MixSetupParms.pmixWrite(MixSetupParms.ulMixHandle, MixBuffers, 2);
+      SetFS(sel);
+      fIsPlaying = TRUE;
+   }
+
    return DS_OK;
 }
@@ -311,4 +332,8 @@
    dprintf(("DSOUND-DART: Dart_Stop"));
 
+   if (!fIsPlaying)
+      return DS_OK;
+
+   fIsPlaying = FALSE;
 //   rc = mciSendCommand(usDeviceID, MCI_PAUSE, MCI_WAIT, NULL, 0);
    rc = mciSendCommand(usDeviceID, MCI_STOP, MCI_WAIT, NULL, 0);
@@ -349,6 +374,7 @@
       MixSetupParms.pmixWrite(MixSetupParms.ulMixHandle, MixBuffers, 2);
       SetFS(sel);
-   }
-
-   return DS_OK;
-}
+      fIsPlaying = TRUE;
+   }
+
+   return DS_OK;
+}
Index: trunk/src/dsound/new/dsound.rc
===================================================================
--- trunk/src/dsound/new/dsound.rc	(revision 3043)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/* $Id: dsound.rc,v 1.1 2000-03-06 13:11:40 mike Exp $ */
-
-#include "winuser.h"
-#include "odinrsrc.h"
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version (based on NT 4 SP3)
-//
-
-1 VERSIONINFO
- FILEVERSION ODIN_FILEVERSION
- PRODUCTVERSION ODIN_PRODUCTVERSION
- FILEFLAGSMASK 0x3fL
- FILEFLAGS 0xaL
- FILEOS 0x10001L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904E4"
-        BEGIN
-            VALUE "Comments", "Odin32 System Dll\0"
-            VALUE "CompanyName", "Odin Team\0"
-            VALUE "FileDescription", "DSOUND System dll\0"
-            VALUE "FileVersion", "4.04\0"
-            VALUE "InternalName", "DSOUND\0"
-            VALUE "LegalCopyright", "Copyright (C) 1999-2000\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "DSOUND.DLL\0"
-            VALUE "ProductName", "Odin32 - DSOUND\0"
-            VALUE "ProductVersion", "4.04\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-	VALUE "Translation", 0x409, 0x04E4
-    END
-END
Index: trunk/src/dsound/new/makefile
===================================================================
--- trunk/src/dsound/new/makefile	(revision 3043)
+++ trunk/src/dsound/new/makefile	(revision 3044)
@@ -1,64 +1,84 @@
-# $Id: makefile,v 1.1 2000-03-06 13:11:41 mike Exp $
+# $Id: makefile,v 1.2 2000-03-08 18:26:48 mike Exp $
 
 #
-# PD-Win32 API
+# Odin32 API
 #
 #       dsound.dll makefile
 #
 
+# Directory macros.
 PDWIN32_INCLUDE = ..\..\..\include
-PDWIN32_LIB = ..\..\..\lib
-PDWIN32_BIN = ..\..\..\bin
-PDWIN32_TOOLS = ..\..\..\tools\bin
+PDWIN32_LIB     = ..\..\..\lib
+PDWIN32_BIN     = ..\..\..\$(OBJDIR)
+PDWIN32_TOOLS   = ..\..\..\tools\bin
 
 
+# Compiler, tools, and interference rules.
 !include $(PDWIN32_INCLUDE)/pdwin32.mk
 
 
-CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
-CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE)
+# Flag overloads and local macros.
+CLEANEXTRAS = dsoundrsrc.asm
 
 
+# Object files. All objects should be prefixed with $(OBJDIR)!
+OBJS = \
+$(OBJDIR)\dsound.obj \
+$(OBJDIR)\os2dsound.obj \
+$(OBJDIR)\initterm.obj \
+$(OBJDIR)\os2sndbuffer.obj \
+$(OBJDIR)\os2primbuff.obj \
+$(OBJDIR)\os2notify.obj \
+$(OBJDIR)\os23dlistener.obj \
+$(OBJDIR)\os23dbuffer.obj \
+$(OBJDIR)\dart.obj \
+$(OBJDIR)\dsmixer.obj \
+$(OBJDIR)\dsoundrsrc.obj
+
+
+# Target name - name of the dll without extention and path.
 TARGET = dsound
 
-OBJS =  dsound.obj os2dsound.obj initterm.obj os2sndbuffer.obj \
-        os2primbuff.obj dart.obj os2notify.obj dsmixer.obj resource.obj
 
-all: $(TARGET).dll $(TARGET).lib
+# All rule - build objs, target dll, copies dll to bin and makes libs.
+all:    $(OBJDIR) \
+        $(OBJDIR)\$(TARGET).dll \
+        $(PDWIN32_BIN)\$(TARGET).dll \
+        lib
 
 
-$(TARGET).dll: $(OBJS) $(TARGET).def
-    $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
-          pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
-          mmpm2.lib  $(PDWIN32_LIB)/ole32.lib \
-          $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
-    $(CP) $@ $(PDWIN32_BIN)
+# Lib rule - build importlibrary (and evt. other libs)
+lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
 
 
-lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
-
-$(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
-    $(CP) $** $@
-
-$(TARGET).lib: $(TARGET).def
-    $(IMPLIB) $(IMPLIBFLAGS) $@ $**
-    $(CP) $@ $(PDWIN32_LIB)
-
-resource.asm: $(TARGET).rc
-    $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
+# Dll rule - builds the target dll.
+$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
+    $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
 
 
+# Linker file - creates the parameter file passed on to the linker.
+$(OBJDIR)\$(TARGET).lrf: makefile
+    @echo Creating file <<$@
+/OUT:$(OBJDIR)\$(TARGET).dll
+/MAP:$(OBJDIR)\$(TARGET).map
+$(OBJS)
+pmwinx.lib
+$(PDWIN32_LIB)/kernel32.lib
+$(PDWIN32_LIB)/odincrt.lib
+$(PDWIN32_LIB)/ole32.lib
+mmpm2.lib
+OS2386.LIB
+$(RTLLIB_O)
+$(TARGET).def
+<<keep
+
+
+# Dep rule - makes depenencies for C, C++ and Asm files.
 dep:
     $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
         *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
 
-!ifndef NODEP
-!include .depend
-!endif
 
+# Includes the common rules.
+!include $(PDWIN32_INCLUDE)/pdwin32.post
 
-clean:
-    $(RM) *.obj *.lib *.dll *.map *.pch \
-        $(PDWIN32_BIN)\$(TARGET).dll $(PDWIN32_LIB)\$(TARGET).lib \
-        resource.asm $(TARGET)exp.def
-
Index: trunk/src/dsound/new/resource.asm
===================================================================
--- trunk/src/dsound/new/resource.asm	(revision 3043)
+++ 	(revision )
@@ -1,160 +1,0 @@
-;/* This file is generated with wrc version 1.0.14 (08-Aug-1999). Do not edit! */
-;/* Source : dsound.rc */
-;/* Cmdline: wrc -s -I. -ID:\IBMCPP\include -I..\..\include -I..\..\include\win -o resource.asm dsound.rc */
-;/* Date   : Thu Feb 24 23:50:09 2000 */
-
-	.386p
-	.model flat
-	.data
-
-	align	4
-_Resource_PEResTab:
-	public	_Resource_PEResTab
-	dd	0
-	dd	038b5b5a1h
-	dd	0
-	dw	0, 1
-	dd	16
-	dd	(L16 - _Resource_PEResTab) or 80000000h
-L16:
-	dd	0
-	dd	038b5b5a1h
-	dd	0
-	dw	0, 1
-	dd	1
-	dd	(L16_1 - _Resource_PEResTab) or 80000000h
-L16_1:
-	dd	0
-	dd	038b5b5a1h
-	dd	0
-	dw	0, 1
-	dd	000000000h
-	dd	L16_1_0 - _Resource_PEResTab
-_Resource_ResourceDirectory:
-	public	_Resource_ResourceDirectory
-L16_1_0:
-	dd	_Resource_VerInf_1_0_data - _Resource_PEResTab
-	dd	804
-	dd	0
-	dd	0
-
-LResTabEnd:
-
-;/* Resource binary data */
-
-	align	4
-_Resource_VerInf_1_0_data:
-	db	024h, 003h, 034h, 000h, 000h, 000h, 056h, 000h
-	db	053h, 000h, 05fh, 000h, 056h, 000h, 045h, 000h
-	db	052h, 000h, 053h, 000h, 049h, 000h, 04fh, 000h
-	db	04eh, 000h, 05fh, 000h, 049h, 000h, 04eh, 000h
-	db	046h, 000h, 04fh, 000h, 000h, 000h, 000h, 000h
-	db	0bdh, 004h, 0efh, 0feh, 000h, 000h, 001h, 000h
-	db	000h, 000h, 001h, 000h, 000h, 000h, 000h, 000h
-	db	000h, 000h, 001h, 000h, 000h, 000h, 000h, 000h
-	db	03fh, 000h, 000h, 000h, 00ah, 000h, 000h, 000h
-	db	001h, 000h, 001h, 000h, 001h, 000h, 000h, 000h
-	db	000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
-	db	000h, 000h, 000h, 000h, 084h, 002h, 000h, 000h
-	db	000h, 000h, 053h, 000h, 074h, 000h, 072h, 000h
-	db	069h, 000h, 06eh, 000h, 067h, 000h, 046h, 000h
-	db	069h, 000h, 06ch, 000h, 065h, 000h, 049h, 000h
-	db	06eh, 000h, 066h, 000h, 06fh, 000h, 000h, 000h
-	db	060h, 002h, 000h, 000h, 000h, 000h, 030h, 000h
-	db	034h, 000h, 030h, 000h, 039h, 000h, 030h, 000h
-	db	034h, 000h, 045h, 000h, 034h, 000h, 000h, 000h
-	db	03ch, 000h, 012h, 000h, 001h, 000h, 043h, 000h
-	db	06fh, 000h, 06dh, 000h, 06dh, 000h, 065h, 000h
-	db	06eh, 000h, 074h, 000h, 073h, 000h, 000h, 000h
-	db	04fh, 000h, 064h, 000h, 069h, 000h, 06eh, 000h
-	db	033h, 000h, 032h, 000h, 020h, 000h, 053h, 000h
-	db	079h, 000h, 073h, 000h, 074h, 000h, 065h, 000h
-	db	06dh, 000h, 020h, 000h, 044h, 000h, 06ch, 000h
-	db	06ch, 000h, 000h, 000h, 034h, 000h, 00ah, 000h
-	db	001h, 000h, 043h, 000h, 06fh, 000h, 06dh, 000h
-	db	070h, 000h, 061h, 000h, 06eh, 000h, 079h, 000h
-	db	04eh, 000h, 061h, 000h, 06dh, 000h, 065h, 000h
-	db	000h, 000h, 000h, 000h, 04fh, 000h, 064h, 000h
-	db	069h, 000h, 06eh, 000h, 020h, 000h, 054h, 000h
-	db	065h, 000h, 061h, 000h, 06dh, 000h, 000h, 000h
-	db	04ch, 000h, 012h, 000h, 001h, 000h, 046h, 000h
-	db	069h, 000h, 06ch, 000h, 065h, 000h, 044h, 000h
-	db	065h, 000h, 073h, 000h, 063h, 000h, 072h, 000h
-	db	069h, 000h, 070h, 000h, 074h, 000h, 069h, 000h
-	db	06fh, 000h, 06eh, 000h, 000h, 000h, 000h, 000h
-	db	044h, 000h, 053h, 000h, 04fh, 000h, 055h, 000h
-	db	04eh, 000h, 044h, 000h, 020h, 000h, 053h, 000h
-	db	079h, 000h, 073h, 000h, 074h, 000h, 065h, 000h
-	db	06dh, 000h, 020h, 000h, 064h, 000h, 06ch, 000h
-	db	06ch, 000h, 000h, 000h, 02ah, 000h, 005h, 000h
-	db	001h, 000h, 046h, 000h, 069h, 000h, 06ch, 000h
-	db	065h, 000h, 056h, 000h, 065h, 000h, 072h, 000h
-	db	073h, 000h, 069h, 000h, 06fh, 000h, 06eh, 000h
-	db	000h, 000h, 000h, 000h, 034h, 000h, 02eh, 000h
-	db	030h, 000h, 034h, 000h, 000h, 000h, 000h, 000h
-	db	02eh, 000h, 007h, 000h, 001h, 000h, 049h, 000h
-	db	06eh, 000h, 074h, 000h, 065h, 000h, 072h, 000h
-	db	06eh, 000h, 061h, 000h, 06ch, 000h, 04eh, 000h
-	db	061h, 000h, 06dh, 000h, 065h, 000h, 000h, 000h
-	db	044h, 000h, 053h, 000h, 04fh, 000h, 055h, 000h
-	db	04eh, 000h, 044h, 000h, 000h, 000h, 000h, 000h
-	db	054h, 000h, 018h, 000h, 001h, 000h, 04ch, 000h
-	db	065h, 000h, 067h, 000h, 061h, 000h, 06ch, 000h
-	db	043h, 000h, 06fh, 000h, 070h, 000h, 079h, 000h
-	db	072h, 000h, 069h, 000h, 067h, 000h, 068h, 000h
-	db	074h, 000h, 000h, 000h, 043h, 000h, 06fh, 000h
-	db	070h, 000h, 079h, 000h, 072h, 000h, 069h, 000h
-	db	067h, 000h, 068h, 000h, 074h, 000h, 020h, 000h
-	db	028h, 000h, 043h, 000h, 029h, 000h, 020h, 000h
-	db	031h, 000h, 039h, 000h, 039h, 000h, 039h, 000h
-	db	02dh, 000h, 032h, 000h, 030h, 000h, 030h, 000h
-	db	030h, 000h, 000h, 000h, 02ah, 000h, 001h, 000h
-	db	001h, 000h, 04ch, 000h, 065h, 000h, 067h, 000h
-	db	061h, 000h, 06ch, 000h, 054h, 000h, 072h, 000h
-	db	061h, 000h, 064h, 000h, 065h, 000h, 06dh, 000h
-	db	061h, 000h, 072h, 000h, 06bh, 000h, 073h, 000h
-	db	000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
-	db	03eh, 000h, 00bh, 000h, 001h, 000h, 04fh, 000h
-	db	072h, 000h, 069h, 000h, 067h, 000h, 069h, 000h
-	db	06eh, 000h, 061h, 000h, 06ch, 000h, 046h, 000h
-	db	069h, 000h, 06ch, 000h, 065h, 000h, 06eh, 000h
-	db	061h, 000h, 06dh, 000h, 065h, 000h, 000h, 000h
-	db	044h, 000h, 053h, 000h, 04fh, 000h, 055h, 000h
-	db	04eh, 000h, 044h, 000h, 02eh, 000h, 044h, 000h
-	db	04ch, 000h, 04ch, 000h, 000h, 000h, 000h, 000h
-	db	040h, 000h, 010h, 000h, 001h, 000h, 050h, 000h
-	db	072h, 000h, 06fh, 000h, 064h, 000h, 075h, 000h
-	db	063h, 000h, 074h, 000h, 04eh, 000h, 061h, 000h
-	db	06dh, 000h, 065h, 000h, 000h, 000h, 000h, 000h
-	db	04fh, 000h, 064h, 000h, 069h, 000h, 06eh, 000h
-	db	033h, 000h, 032h, 000h, 020h, 000h, 02dh, 000h
-	db	020h, 000h, 044h, 000h, 053h, 000h, 04fh, 000h
-	db	055h, 000h, 04eh, 000h, 044h, 000h, 000h, 000h
-	db	02eh, 000h, 005h, 000h, 001h, 000h, 050h, 000h
-	db	072h, 000h, 06fh, 000h, 064h, 000h, 075h, 000h
-	db	063h, 000h, 074h, 000h, 056h, 000h, 065h, 000h
-	db	072h, 000h, 073h, 000h, 069h, 000h, 06fh, 000h
-	db	06eh, 000h, 000h, 000h, 034h, 000h, 02eh, 000h
-	db	030h, 000h, 034h, 000h, 000h, 000h, 000h, 000h
-	db	044h, 000h, 000h, 000h, 000h, 000h, 056h, 000h
-	db	061h, 000h, 072h, 000h, 046h, 000h, 069h, 000h
-	db	06ch, 000h, 065h, 000h, 049h, 000h, 06eh, 000h
-	db	066h, 000h, 06fh, 000h, 000h, 000h, 000h, 000h
-	db	024h, 000h, 004h, 000h, 000h, 000h, 054h, 000h
-	db	072h, 000h, 061h, 000h, 06eh, 000h, 073h, 000h
-	db	06ch, 000h, 061h, 000h, 074h, 000h, 069h, 000h
-	db	06fh, 000h, 06eh, 000h, 000h, 000h, 000h, 000h
-	db	009h, 004h, 0e4h, 004h
-
-	align	4
-_Resource_ResourceDescriptor:
-	public	_Resource_ResourceDescriptor
-_Resource_ResourceTable:
-	dd	_Resource_PEResTab
-_Resource_NumberOfResources:
-	dd	1
-_Resource_ResourceSectionSize:
-	dd	LResTabEnd - _Resource_PEResTab
-_Resource_ResourcesEntries:
-	dd	_Resource_ResourceDirectory
-	end
