Changeset 13624


Ignore:
Timestamp:
Mar 8, 2000, 7:26:49 PM (25 years ago)
Author:
mike
Message:

Killed no longer needed files

Location:
tags/trunk/src/dsound/new
Files:
3 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/dsound/new/OS2DSOUND.CPP

    r13607 r13624  
    1 /* $Id: OS2DSOUND.CPP,v 1.1 2000-03-06 13:11:38 mike Exp $ */
     1/* $Id: OS2DSOUND.CPP,v 1.2 2000-03-08 18:26:47 mike Exp $ */
    22
    33/*
     
    2121#include <dsound.h>
    2222
    23 #include "os2dsound.h"
    24 #include "os2sndbuffer.h"
    25 #include "os2primbuff.h"
    26 #include "os2notify.h"
     23#include "OS2DSound.h"
     24#include "OS2SndBuffer.h"
     25#include "OS2PrimBuff.h"
     26#include "OS23DListener.h"
     27#include "OS2Notify.h"
    2728#include <misc.h>
    2829
  • TabularUnified tags/trunk/src/dsound/new/OS2NOTIFY.H

    r13607 r13624  
    99#ifndef __OS2NOTIFY_H__
    1010#define __OS2NOTIFY_H__
    11 
    12 #include <mmsystem.h>
    1311
    1412#undef THIS
     
    4846};
    4947
    50 //******************************************************************************
    51 //******************************************************************************
    52 HRESULT __stdcall SoundNotifyQueryInterface(THIS, REFIID riid, LPVOID * ppvObj);
    53 ULONG   __stdcall SoundNotifyAddRef(THIS);
    54 ULONG   __stdcall SoundNotifyRelease(THIS);
    55 HRESULT __stdcall SoundNotifySetNotificationPositions(THIS, DWORD cPositionNotifies, LPCDSBPOSITIONNOTIFY lpcPositionNotifies);
    56 
    5748#endif
  • TabularUnified tags/trunk/src/dsound/new/OS2PrimBuff.cpp

    r13607 r13624  
    4646#include "OS2SndBuffer.h"
    4747#include "OS2PrimBuff.h"
     48#include "OS23DListener.h"
    4849
    4950#include "dart.h"
     51
     52#undef THIS
     53#define THIS VOID*This
     54
     55#undef THIS_
     56#define THIS_ VOID*This,
    5057
    5158//******************************************************************************
     
    8592   fPrimary   = TRUE;
    8693   Referenced = 0;
     94   listener   = NULL;
    8795
    8896   lpfxFormat = (WAVEFORMATEX *)malloc(/*bufferdesc.lpwfxFormat->cbSize +*/ sizeof(WAVEFORMATEX));
     
    128136HRESULT WIN32API PrimBufQueryInterface(THIS, REFIID riid, LPVOID * ppvObj)
    129137{
     138   dprintf(("DSOUND-PrimBuff: QueryInterface"));
     139
    130140   if (This == NULL) {
    131      return DSERR_INVALIDPARAM;
     141      return DSERR_INVALIDPARAM;
    132142   }
    133143   *ppvObj = NULL;
    134144
    135    if (!IsEqualGUID(riid, IID_IDirectSoundBuffer))
    136      return E_NOINTERFACE;
    137 
    138    *ppvObj = This;
    139 
    140    PrimBufAddRef(This);
    141    return DS_OK;
     145   if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {
     146      *ppvObj = This;
     147      PrimBufAddRef(This);
     148      return DS_OK;
     149   }
     150
     151
     152   if (IsEqualGUID(riid, IID_IDirectSound3DListener)) {
     153      OS2PrimBuff                *me = (OS2PrimBuff *)This;
     154      OS2IDirectSound3DListener  *listener;
     155
     156      listener     = new OS2IDirectSound3DListener(me);
     157      *ppvObj      = listener;
     158      listener->Vtbl.AddRef((IDirectSound3DListener *)listener);
     159      return DS_OK;
     160   }
     161
     162   return E_NOINTERFACE;
    142163}
    143164
  • TabularUnified tags/trunk/src/dsound/new/OS2PrimBuff.h

    r13607 r13624  
    1818#define THIS_ VOID*This,
    1919
    20 
     20// a forward declaration is needed here
     21class OS2IDirectSound3DListener;
    2122
    2223class OS2PrimBuff: public OS2IDirectSoundBuffer
     
    2930    int     Referenced;
    3031    inline  HRESULT       GetLastError()    { return lastError;    };
     32    inline  void          Set3DListener(OS2IDirectSound3DListener *_listener) {
     33                                            listener = _listener; };
    3134
    3235 private:
     36 protected:
     37
    3338    void *vpMixBuffer;
    3439    void *vpMixSetup;
     
    4247    long  channels;// Number of Channels 1 or 2 MONO/Stereo
    4348
    44  protected:
     49    OS2IDirectSound3DListener* listener;  // pointer to the associated 3DListener object
     50
    4551    HRESULT lastError;
    4652
  • TabularUnified tags/trunk/src/dsound/new/OS2SNDBUFFER.CPP

    r13607 r13624  
    1 /* $Id: OS2SNDBUFFER.CPP,v 1.1 2000-03-06 13:11:39 mike Exp $ */
     1/* $Id: OS2SNDBUFFER.CPP,v 1.2 2000-03-08 18:26:47 mike Exp $ */
    22
    33/*
     
    2525#include <dsound.h>
    2626
    27 #include "os2dsound.h"
    28 #include "os2sndbuffer.h"
    29 #include "os2primbuff.h"
    30 #include "os2notify.h"
     27#include "OS2DSound.h"
     28#include "OS2SndBuffer.h"
     29#include "OS2PrimBuff.h"
     30#include "OS23DListener.h"
     31#include "OS23DBuffer.h"
     32#include "OS2Notify.h"
    3133#include <misc.h>
    3234
     
    226228      return DS_OK;
    227229   }
     230
     231   if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {
     232      OS2IDirectSoundBuffer   *me     = (OS2IDirectSoundBuffer *)This;
     233      OS2IDirectSound3DBuffer *buffer3D;
     234
     235      buffer3D   = new OS2IDirectSound3DBuffer(me);
     236      *ppvObj    = buffer3D;
     237      buffer3D->Vtbl.AddRef((IDirectSound3DBuffer *)buffer3D);
     238      return DS_OK;
     239   }
     240
    228241   return E_NOINTERFACE;
    229242}
  • TabularUnified tags/trunk/src/dsound/new/OS2SNDBUFFER.H

    r13607 r13624  
    1 /* $Id: OS2SNDBUFFER.H,v 1.1 2000-03-06 13:11:39 mike Exp $ */
     1/* $Id: OS2SNDBUFFER.H,v 1.2 2000-03-08 18:26:48 mike Exp $ */
    22
    33/*
     
    1212#define __OS2SNDBUFFER_H__
    1313
    14 #include <mmsystem.h>
    15 
    1614#undef THIS
    1715#define THIS VOID*This
     
    2018#define THIS_ VOID*This,
    2119
    22 // a forward declaration of the Notify class is needed here!
     20// a forward declaration of some classes is needed here!
    2321class OS2IDirectSoundNotify;
     22class OS2IDirectSound3DBuffer;
    2423
    2524class OS2IDirectSoundBuffer
     
    4039    inline  void          SetNotify(OS2IDirectSoundNotify *_notify) {
    4140                                    notify = _notify; };
     41    inline  void          Set3DBuffer(OS2IDirectSound3DBuffer *_buffer3D) {
     42                                      buffer3D = _buffer3D; };
    4243 private:
    4344
     
    6162    char *lpBuffer;            // sound data
    6263
    63     OS2IDirectSoundNotify* notify;  // pointer to the associated Notify object (if exists)
    64     OS2IDirectSound*       parentDS;
     64    OS2IDirectSoundNotify*   notify;    // pointer to the associated Notify object (if exists)
     65    OS2IDirectSound3DBuffer* buffer3D;  // pointer to the associated 3DBuffer object (if exists)
     66    OS2IDirectSound*         parentDS;
    6567
    6668              // Linked list management
  • TabularUnified tags/trunk/src/dsound/new/dart.cpp

    r13615 r13624  
    2525static long               lLastBuff;
    2626static char               *pDSoundBuff;
     27static BOOL               fIsPlaying = FALSE;
    2728
    2829USHORT               usDeviceID;                 /* Amp Mixer device id          */
     
    7071   MCI_AMP_OPEN_PARMS  AmpOpenParms;
    7172   //MCI_WAVE_SET_PARMS WaveSetParms;
    72    ULONG   rc;
     73   ULONG   rc, ulNew;
     74   LONG    lAdd = 5;
    7375   short   device = 0;
    7476
    7577   dprintf(("DSOUND-DART: Dart_Open_Device"));
     78
     79   DosSetRelMaxFH(&lAdd, &ulNew);
    7680
    7781   *vpMixBuffer    = &MixBuffers;
     
    175179   MCI_MIXSETUP_PARMS  *MixSetup;
    176180   MCI_BUFFER_PARMS    *BufferParms;
     181   ULONG               rc;
    177182
    178183   dprintf(("DSOUND-DART: Dart_Close_Device"));
     
    182187   BufferParms = (MCI_BUFFER_PARMS*)vpBuffParms;
    183188
    184     if (MixBuffer->pBuffer) {
    185        mciSendCommand(usDeviceID,MCI_BUFFER,MCI_WAIT|MCI_DEALLOCATE_MEMORY, BufferParms,0);
    186        MixBuffer->pBuffer=NULL;
    187     }
    188     if (usDeviceID) {
    189         mciSendCommand(usDeviceID,MCI_CLOSE,MCI_WAIT, NULL, 0);
    190         usDeviceID=0;
    191     }
     189   rc = mciSendCommand(usDeviceID, MCI_BUFFER, MCI_WAIT | MCI_DEALLOCATE_MEMORY, BufferParms, 0);
     190   if (rc != MCIERR_SUCCESS) {
     191      dprintf(("DSOUND-DART: MCI_BUFFER (Close) %d", rc));
     192   }
     193   rc = mciSendCommand(usDeviceID, MCI_CLOSE, MCI_WAIT, NULL, 0);
     194   if (rc != MCIERR_SUCCESS) {
     195      dprintf(("DSOUND-DART: MCI_CLOSE (Close) %d", rc));
     196   }
    192197
    193198   dprintf(("DSOUND-DART: Dart_Close_Device returning DS_OK"));
     
    301306   }
    302307
     308   /* If the primary buffer was playing, we have to restart it!! */
     309   if (fIsPlaying) {
     310      dprintf(("DSOUND-DART: Restarting playback!!!!"));
     311
     312      /* Mix the first buffer before playing */
     313      MixCallback(BUFFER_SIZE/NUM_DART_BUFFS);
     314      memcpy(pMixBuffs[lLastBuff].pBuffer, &pDSoundBuff[lLastBuff*(BUFFER_SIZE/NUM_DART_BUFFS)], BUFFER_SIZE/NUM_DART_BUFFS);
     315
     316      USHORT  sel = RestoreOS2FS();
     317      /* Note: the call to pmixWrite trashes the FS selector, we have to save */
     318      /* and then restore FS!!! Otherwise exception handling will be broken.  */
     319      MixSetupParms.pmixWrite(MixSetupParms.ulMixHandle, MixBuffers, 2);
     320      SetFS(sel);
     321      fIsPlaying = TRUE;
     322   }
     323
    303324   return DS_OK;
    304325}
     
    311332   dprintf(("DSOUND-DART: Dart_Stop"));
    312333
     334   if (!fIsPlaying)
     335      return DS_OK;
     336
     337   fIsPlaying = FALSE;
    313338//   rc = mciSendCommand(usDeviceID, MCI_PAUSE, MCI_WAIT, NULL, 0);
    314339   rc = mciSendCommand(usDeviceID, MCI_STOP, MCI_WAIT, NULL, 0);
     
    349374      MixSetupParms.pmixWrite(MixSetupParms.ulMixHandle, MixBuffers, 2);
    350375      SetFS(sel);
    351    }
    352 
    353    return DS_OK;
    354 }
     376      fIsPlaying = TRUE;
     377   }
     378
     379   return DS_OK;
     380}
  • TabularUnified tags/trunk/src/dsound/new/makefile

    r13607 r13624  
    1 # $Id: makefile,v 1.1 2000-03-06 13:11:41 mike Exp $
     1# $Id: makefile,v 1.2 2000-03-08 18:26:48 mike Exp $
    22
    33#
    4 # PD-Win32 API
     4# Odin32 API
    55#
    66#       dsound.dll makefile
    77#
    88
     9# Directory macros.
    910PDWIN32_INCLUDE = ..\..\..\include
    10 PDWIN32_LIB = ..\..\..\lib
    11 PDWIN32_BIN = ..\..\..\bin
    12 PDWIN32_TOOLS = ..\..\..\tools\bin
     11PDWIN32_LIB     = ..\..\..\lib
     12PDWIN32_BIN     = ..\..\..\$(OBJDIR)
     13PDWIN32_TOOLS   = ..\..\..\tools\bin
    1314
    1415
     16# Compiler, tools, and interference rules.
    1517!include $(PDWIN32_INCLUDE)/pdwin32.mk
    1618
    1719
    18 CFLAGS = $(CFLAGS) -I$(PDWIN32_INCLUDE)
    19 CXXFLAGS = $(CXXFLAGS) -I$(PDWIN32_INCLUDE)
     20# Flag overloads and local macros.
     21CLEANEXTRAS = dsoundrsrc.asm
    2022
    2123
     24# Object files. All objects should be prefixed with $(OBJDIR)!
     25OBJS = \
     26$(OBJDIR)\dsound.obj \
     27$(OBJDIR)\os2dsound.obj \
     28$(OBJDIR)\initterm.obj \
     29$(OBJDIR)\os2sndbuffer.obj \
     30$(OBJDIR)\os2primbuff.obj \
     31$(OBJDIR)\os2notify.obj \
     32$(OBJDIR)\os23dlistener.obj \
     33$(OBJDIR)\os23dbuffer.obj \
     34$(OBJDIR)\dart.obj \
     35$(OBJDIR)\dsmixer.obj \
     36$(OBJDIR)\dsoundrsrc.obj
     37
     38
     39# Target name - name of the dll without extention and path.
    2240TARGET = dsound
    2341
    24 OBJS =  dsound.obj os2dsound.obj initterm.obj os2sndbuffer.obj \
    25         os2primbuff.obj dart.obj os2notify.obj dsmixer.obj resource.obj
    2642
    27 all: $(TARGET).dll $(TARGET).lib
     43# All rule - build objs, target dll, copies dll to bin and makes libs.
     44all:    $(OBJDIR) \
     45        $(OBJDIR)\$(TARGET).dll \
     46        $(PDWIN32_BIN)\$(TARGET).dll \
     47        lib
    2848
    2949
    30 $(TARGET).dll: $(OBJS) $(TARGET).def
    31     $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
    32           pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
    33           mmpm2.lib  $(PDWIN32_LIB)/ole32.lib \
    34           $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
    35     $(CP) $@ $(PDWIN32_BIN)
     50# Lib rule - build importlibrary (and evt. other libs)
     51lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    3652
    3753
    38 lib: $(TARGET).lib $(PDWIN32_LIB)\$(TARGET).lib
    39 
    40 $(PDWIN32_LIB)\$(TARGET).lib: $(TARGET).lib
    41     $(CP) $** $@
    42 
    43 $(TARGET).lib: $(TARGET).def
    44     $(IMPLIB) $(IMPLIBFLAGS) $@ $**
    45     $(CP) $@ $(PDWIN32_LIB)
    46 
    47 resource.asm: $(TARGET).rc
    48     $(RC) $(RCFLAGS) -o resource.asm $(TARGET).rc
     54# Dll rule - builds the target dll.
     55$(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def $(OBJDIR)\$(TARGET).lrf
     56    $(LD2) $(LD2FLAGS) @$(OBJDIR)\$(TARGET).lrf
    4957
    5058
     59# Linker file - creates the parameter file passed on to the linker.
     60$(OBJDIR)\$(TARGET).lrf: makefile
     61    @echo Creating file <<$@
     62/OUT:$(OBJDIR)\$(TARGET).dll
     63/MAP:$(OBJDIR)\$(TARGET).map
     64$(OBJS)
     65pmwinx.lib
     66$(PDWIN32_LIB)/kernel32.lib
     67$(PDWIN32_LIB)/odincrt.lib
     68$(PDWIN32_LIB)/ole32.lib
     69mmpm2.lib
     70OS2386.LIB
     71$(RTLLIB_O)
     72$(TARGET).def
     73<<keep
     74
     75
     76# Dep rule - makes depenencies for C, C++ and Asm files.
    5177dep:
    5278    $(DEPEND) -I$(PDWIN32_INCLUDE);$(PDWIN32_INCLUDE)\win \
    5379        *.c *.cpp *.h *.asm *.inc $(PDWIN32_INCLUDE)\*.h
    5480
    55 !ifndef NODEP
    56 !include .depend
    57 !endif
    5881
     82# Includes the common rules.
     83!include $(PDWIN32_INCLUDE)/pdwin32.post
    5984
    60 clean:
    61     $(RM) *.obj *.lib *.dll *.map *.pch \
    62         $(PDWIN32_BIN)\$(TARGET).dll $(PDWIN32_LIB)\$(TARGET).lib \
    63         resource.asm $(TARGET)exp.def
    64 
Note: See TracChangeset for help on using the changeset viewer.