Changeset 21479 for trunk/src/dsound


Ignore:
Timestamp:
Nov 27, 2010, 11:27:43 AM (15 years ago)
Author:
dmik
Message:

Get rid of dd_obj_base.h which duplicates obj_base.h creating unnecessary mess (symbol/define duplication) and conflicts when both the DDarw and other COM-related headers are included.

Location:
trunk/src/dsound
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dsound/DAudioBuffer.cpp

    r8217 r21479  
    2020#include <string.h>
    2121
    22 #define INITGUID
     22#define CINTERFACE
    2323#include <dsound.h>
    2424
     
    186186{
    187187    lpVtbl = &Vtbl;
    188     Vtbl.AddRef               = DAudioBufAddRef;
    189     Vtbl.Release              = DAudioBufRelease;
    190     Vtbl.QueryInterface       = DAudioBufQueryInterface;
    191     Vtbl.GetCaps              = DAudioBufGetCaps;
    192     Vtbl.GetFormat            = DAudioBufGetFormat;
    193     Vtbl.GetVolume            = DAudioBufGetVolume;
    194     Vtbl.GetStatus            = DAudioBufGetStatus;
    195     Vtbl.GetCurrentPosition   = DAudioBufGetCurrentPosition;
    196     Vtbl.GetPan               = DAudioBufGetPan;
    197     Vtbl.GetFrequency         = DAudioBufGetFrequency;
    198     Vtbl.Initialize           = DAudioBufInitialize;
    199     Vtbl.Restore              = DAudioBufRestore;
    200     Vtbl.SetFormat            = DAudioBufSetFormat;
    201     Vtbl.SetVolume            = DAudioBufSetVolume;
    202     Vtbl.SetCurrentPosition   = DAudioBufSetCurrentPosition;
    203     Vtbl.SetPan               = DAudioBufSetPan;
    204     Vtbl.SetFrequency         = DAudioBufSetFrequency;
    205     Vtbl.Lock                 = DAudioBufLock;
    206     Vtbl.Unlock               = DAudioBufUnlock;
    207     Vtbl.Stop                 = DAudioBufStop;
    208     Vtbl.Play                 = DAudioBufPlay;
     188    Vtbl.fnAddRef               = DAudioBufAddRef;
     189    Vtbl.fnRelease              = DAudioBufRelease;
     190    Vtbl.fnQueryInterface       = DAudioBufQueryInterface;
     191    Vtbl.fnGetCaps              = DAudioBufGetCaps;
     192    Vtbl.fnGetFormat            = DAudioBufGetFormat;
     193    Vtbl.fnGetVolume            = DAudioBufGetVolume;
     194    Vtbl.fnGetStatus            = DAudioBufGetStatus;
     195    Vtbl.fnGetCurrentPosition   = DAudioBufGetCurrentPosition;
     196    Vtbl.fnGetPan               = DAudioBufGetPan;
     197    Vtbl.fnGetFrequency         = DAudioBufGetFrequency;
     198    Vtbl.fnInitialize           = DAudioBufInitialize;
     199    Vtbl.fnRestore              = DAudioBufRestore;
     200    Vtbl.fnSetFormat            = DAudioBufSetFormat;
     201    Vtbl.fnSetVolume            = DAudioBufSetVolume;
     202    Vtbl.fnSetCurrentPosition   = DAudioBufSetCurrentPosition;
     203    Vtbl.fnSetPan               = DAudioBufSetPan;
     204    Vtbl.fnSetFrequency         = DAudioBufSetFrequency;
     205    Vtbl.fnLock                 = DAudioBufLock;
     206    Vtbl.fnUnlock               = DAudioBufUnlock;
     207    Vtbl.fnStop                 = DAudioBufStop;
     208    Vtbl.fnPlay                 = DAudioBufPlay;
    209209}
    210210//******************************************************************************
     
    233233   *ppvObj = NULL;
    234234
    235    if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {
     235   if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) {
    236236      *ppvObj = this;
    237237
     
    240240   }
    241241
    242    if (IsEqualGUID(riid, IID_IDirectSoundNotify))
     242   if (IsEqualGUID(riid, &IID_IDirectSoundNotify))
    243243   {
    244244      IDirectAudioNotify  *notify;
     
    246246      notify     = new IDirectAudioNotify(this);
    247247      *ppvObj    = notify;
    248       notify->Vtbl.AddRef(notify);
     248      notify->Vtbl.fnAddRef(notify);
    249249      return DS_OK;
    250250   }
    251251#if 0
    252    if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {
     252   if (IsEqualGUID(riid, &IID_IDirectSound3DBuffer)) {
    253253      OS2IDirectSound3DBuffer *buffer3D;
    254254
    255255      buffer3D   = new OS2IDirectSound3DBuffer(this);
    256256      *ppvObj    = buffer3D;
    257       buffer3D->Vtbl.AddRef((IDirectSound3DBuffer *)buffer3D);
     257      buffer3D->Vtbl.fnAddRef((IDirectSound3DBuffer *)buffer3D);
    258258      return DS_OK;
    259259   }
  • trunk/src/dsound/DAudioNotify.cpp

    r5608 r21479  
    1919#include <string.h>
    2020
    21 #define INITGUID
     21#define CINTERFACE
    2222#include <dsound.h>
    2323
     
    3232{
    3333   lpVtbl = &Vtbl;
    34    Vtbl.AddRef                   = DAudioNotifyAddRef;
    35    Vtbl.Release                  = DAudioNotifyRelease;
    36    Vtbl.QueryInterface           = DAudioNotifyQueryInterface;
    37    Vtbl.SetNotificationPositions = DAudioNotifySetNotificationPositions;
     34   Vtbl.fnAddRef                   = DAudioNotifyAddRef;
     35   Vtbl.fnRelease                  = DAudioNotifyRelease;
     36   Vtbl.fnQueryInterface           = DAudioNotifyQueryInterface;
     37   Vtbl.fnSetNotificationPositions = DAudioNotifySetNotificationPositions;
    3838
    3939   dprintf(("DSOUND-IDirectAudioNotify::IDirectAudioNotify (this=%X)", this));
     
    4545
    4646   // add a reference to the parent SoundBuffer to make sure it won't suddenly disappear
    47    lpSoundBuffer->Vtbl.AddRef(lpSoundBuffer);
     47   lpSoundBuffer->Vtbl.fnAddRef(lpSoundBuffer);
    4848   // set pointer to ourselves in parent SoundBuffer
    4949   lpSoundBuffer->SetNotify(this);
     
    5656   dprintf(("DSOUND-IDirectAudioNotify::~IDirectAudioNotify (this=%X)", this));
    5757   lpSoundBuffer->SetNotify(NULL);
    58    lpSoundBuffer->Vtbl.Release(lpSoundBuffer);
     58   lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer);
    5959   if (lpPositions != NULL)
    6060      free(lpPositions);
     
    7171   *ppvObj = NULL;
    7272
    73    if (!IsEqualGUID(riid, IID_IDirectSoundNotify))
     73   if (!IsEqualGUID(riid, &IID_IDirectSoundNotify))
    7474      return E_NOINTERFACE;
    7575
  • trunk/src/dsound/DSOUND.CPP

    r7431 r21479  
    2020
    2121#define INITGUID
    22 #define ICOM_CINTERFACE 1
    2322#define CINTERFACE
    2423#include <dsound.h>
     
    4544   if (OS2IDirectSound::fDSExists) {
    4645      *ppDS = (LPDIRECTSOUND)DS;
    47       DS->Vtbl.AddRef(DS);
     46      DS->Vtbl.fnAddRef(DS);
    4847      return DS_OK;
    4948   }
     
    6160   else {
    6261     *ppDS = (LPDIRECTSOUND)newsound;
    63      newsound->Vtbl.AddRef(newsound);
     62     newsound->Vtbl.fnAddRef(newsound);
    6463     DS = newsound;
    6564   }
     
    178177
    179178  dprintf(("DSOUND:DSCF_CreateInstance\n"));
    180   if( lpGUID && (*lpGUID == IID_IDirectSound )) {
     179  if(lpGUID && IsEqualGUID(lpGUID, &IID_IDirectSound)) {
    181180    return OS2DirectSoundCreate(lpGUID,(LPDIRECTSOUND*)ppobj,pOuter);
    182181  }
     
    223222  {
    224223    *ppv = (LPVOID)&DSOUND_CF;
    225     DSOUND_CF.lpvtbl->AddRef((IClassFactory*)&DSOUND_CF);
     224    DSOUND_CF.lpvtbl->fnAddRef((IClassFactory*)&DSOUND_CF);
    226225    return S_OK;
    227226  }
  • trunk/src/dsound/OS23DBuffer.cpp

    r3925 r21479  
    1919#include <string.h>
    2020
    21 #define INITGUID
     21#define CINTERFACE
    2222#include <dsound.h>
    2323
     
    4242{
    4343   lpVtbl = &Vtbl;
    44    Vtbl.AddRef                   = Sound3DBufferAddRef;
    45    Vtbl.Release                  = Sound3DBufferRelease;
    46    Vtbl.QueryInterface           = Sound3DBufferQueryInterface;
    47    Vtbl.GetAllParameters         = Sound3DBufferGetAllParameters;
    48    Vtbl.SetAllParameters         = Sound3DBufferSetAllParameters;
    49    Vtbl.GetMaxDistance           = Sound3DBufferGetMaxDistance;
    50    Vtbl.SetMaxDistance           = Sound3DBufferSetMaxDistance;
    51    Vtbl.GetMinDistance           = Sound3DBufferGetMinDistance;
    52    Vtbl.SetMinDistance           = Sound3DBufferSetMinDistance;
    53    Vtbl.GetMode                  = Sound3DBufferGetMode;
    54    Vtbl.SetMode                  = Sound3DBufferSetMode;
    55    Vtbl.GetPosition              = Sound3DBufferGetPosition;
    56    Vtbl.SetPosition              = Sound3DBufferSetPosition;
    57    Vtbl.GetConeAngles            = Sound3DBufferGetConeAngles;
    58    Vtbl.SetConeAngles            = Sound3DBufferSetConeAngles;
    59    Vtbl.GetConeOrientation       = Sound3DBufferGetConeOrientation;
    60    Vtbl.SetConeOrientation       = Sound3DBufferSetConeOrientation;
    61    Vtbl.GetConeOutsideVolume     = Sound3DBufferGetConeOutsideVolume;
    62    Vtbl.SetConeOutsideVolume     = Sound3DBufferSetConeOutsideVolume;
    63    Vtbl.GetVelocity              = Sound3DBufferGetVelocity;
    64    Vtbl.SetVelocity              = Sound3DBufferSetVelocity;
     44   Vtbl.fnAddRef                   = Sound3DBufferAddRef;
     45   Vtbl.fnRelease                  = Sound3DBufferRelease;
     46   Vtbl.fnQueryInterface           = Sound3DBufferQueryInterface;
     47   Vtbl.fnGetAllParameters         = Sound3DBufferGetAllParameters;
     48   Vtbl.fnSetAllParameters         = Sound3DBufferSetAllParameters;
     49   Vtbl.fnGetMaxDistance           = Sound3DBufferGetMaxDistance;
     50   Vtbl.fnSetMaxDistance           = Sound3DBufferSetMaxDistance;
     51   Vtbl.fnGetMinDistance           = Sound3DBufferGetMinDistance;
     52   Vtbl.fnSetMinDistance           = Sound3DBufferSetMinDistance;
     53   Vtbl.fnGetMode                  = Sound3DBufferGetMode;
     54   Vtbl.fnSetMode                  = Sound3DBufferSetMode;
     55   Vtbl.fnGetPosition              = Sound3DBufferGetPosition;
     56   Vtbl.fnSetPosition              = Sound3DBufferSetPosition;
     57   Vtbl.fnGetConeAngles            = Sound3DBufferGetConeAngles;
     58   Vtbl.fnSetConeAngles            = Sound3DBufferSetConeAngles;
     59   Vtbl.fnGetConeOrientation       = Sound3DBufferGetConeOrientation;
     60   Vtbl.fnSetConeOrientation       = Sound3DBufferSetConeOrientation;
     61   Vtbl.fnGetConeOutsideVolume     = Sound3DBufferGetConeOutsideVolume;
     62   Vtbl.fnSetConeOutsideVolume     = Sound3DBufferSetConeOutsideVolume;
     63   Vtbl.fnGetVelocity              = Sound3DBufferGetVelocity;
     64   Vtbl.fnSetVelocity              = Sound3DBufferSetVelocity;
    6565
    6666
     
    7474
    7575   // add a reference to the parent primary SoundBuffer to make sure it won't suddenly disappear
    76    lpSoundBuffer->Vtbl.AddRef(lpSoundBuffer);
     76   lpSoundBuffer->Vtbl.fnAddRef(lpSoundBuffer);
    7777   // set pointer to ourselves in parent SoundBuffer
    7878   lpSoundBuffer->Set3DBuffer(this);
     
    8585   dprintf(("DSOUND-OS2IDirectSound3DBuffer::~OS2IDirectSound3DBuffer (this=%X)", this));
    8686   lpSoundBuffer->Set3DBuffer(NULL);
    87    lpSoundBuffer->Vtbl.Release(lpSoundBuffer);
     87   lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer);
    8888}
    8989
     
    9898   *ppvObj = NULL;
    9999
    100    if (!IsEqualGUID(riid, IID_IDirectSound3DBuffer))
     100   if (!IsEqualGUID(riid, &IID_IDirectSound3DBuffer))
    101101      return E_NOINTERFACE;
    102102
  • trunk/src/dsound/OS23DListener.cpp

    r3925 r21479  
    1919#include <string.h>
    2020
    21 #define INITGUID
     21#define CINTERFACE
    2222#include <dsound.h>
    2323
     
    4242{
    4343   lpVtbl = &Vtbl;
    44    Vtbl.AddRef                   = Sound3DListenerAddRef;
    45    Vtbl.Release                  = Sound3DListenerRelease;
    46    Vtbl.QueryInterface           = Sound3DListenerQueryInterface;
    47    Vtbl.GetAllParameters         = Sound3DListenerGetAllParameters;
    48    Vtbl.SetAllParameters         = Sound3DListenerSetAllParameters;
    49    Vtbl.CommitDeferredSettings   = Sound3DListenerCommitDeferredSettings;
    50    Vtbl.GetDistanceFactor        = Sound3DListenerGetDistanceFactor;
    51    Vtbl.SetDistanceFactor        = Sound3DListenerSetDistanceFactor;
    52    Vtbl.GetDopplerFactor         = Sound3DListenerGetDopplerFactor;
    53    Vtbl.SetDopplerFactor         = Sound3DListenerSetDopplerFactor;
    54    Vtbl.GetOrientation           = Sound3DListenerGetOrientation;
    55    Vtbl.SetOrientation           = Sound3DListenerSetOrientation;
    56    Vtbl.GetPosition              = Sound3DListenerGetPosition;
    57    Vtbl.SetPosition              = Sound3DListenerSetPosition;
    58    Vtbl.GetRolloffFactor         = Sound3DListenerGetRolloffFactor;
    59    Vtbl.SetRolloffFactor         = Sound3DListenerSetRolloffFactor;
    60    Vtbl.GetVelocity              = Sound3DListenerGetVelocity;
    61    Vtbl.SetVelocity              = Sound3DListenerSetVelocity;
     44   Vtbl.fnAddRef                   = Sound3DListenerAddRef;
     45   Vtbl.fnRelease                  = Sound3DListenerRelease;
     46   Vtbl.fnQueryInterface           = Sound3DListenerQueryInterface;
     47   Vtbl.fnGetAllParameters         = Sound3DListenerGetAllParameters;
     48   Vtbl.fnSetAllParameters         = Sound3DListenerSetAllParameters;
     49   Vtbl.fnCommitDeferredSettings   = Sound3DListenerCommitDeferredSettings;
     50   Vtbl.fnGetDistanceFactor        = Sound3DListenerGetDistanceFactor;
     51   Vtbl.fnSetDistanceFactor        = Sound3DListenerSetDistanceFactor;
     52   Vtbl.fnGetDopplerFactor         = Sound3DListenerGetDopplerFactor;
     53   Vtbl.fnSetDopplerFactor         = Sound3DListenerSetDopplerFactor;
     54   Vtbl.fnGetOrientation           = Sound3DListenerGetOrientation;
     55   Vtbl.fnSetOrientation           = Sound3DListenerSetOrientation;
     56   Vtbl.fnGetPosition              = Sound3DListenerGetPosition;
     57   Vtbl.fnSetPosition              = Sound3DListenerSetPosition;
     58   Vtbl.fnGetRolloffFactor         = Sound3DListenerGetRolloffFactor;
     59   Vtbl.fnSetRolloffFactor         = Sound3DListenerSetRolloffFactor;
     60   Vtbl.fnGetVelocity              = Sound3DListenerGetVelocity;
     61   Vtbl.fnSetVelocity              = Sound3DListenerSetVelocity;
    6262
    6363
     
    7171
    7272   // add a reference to the parent primary SoundBuffer to make sure it won't suddenly disappear
    73    lpSoundBuffer->Vtbl.AddRef(lpSoundBuffer);
     73   lpSoundBuffer->Vtbl.fnAddRef(lpSoundBuffer);
    7474   // set pointer to ourselves in parent SoundBuffer
    7575   lpSoundBuffer->Set3DListener(this);
     
    8282   dprintf(("DSOUND-OS2IDirectSound3DListener::~OS2IDirectSound3DListener (this=%X)", this));
    8383   lpSoundBuffer->Set3DListener(NULL);
    84    lpSoundBuffer->Vtbl.Release(lpSoundBuffer);
     84   lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer);
    8585}
    8686
     
    9595   *ppvObj = NULL;
    9696
    97    if (!IsEqualGUID(riid, IID_IDirectSound3DListener))
     97   if (!IsEqualGUID(riid, &IID_IDirectSound3DListener))
    9898      return E_NOINTERFACE;
    9999
  • trunk/src/dsound/OS2DSOUND.CPP

    r5292 r21479  
    2121#include <stdio.h> /****** DEBUGGING ********/
    2222
    23 #define INITGUID
     23#define CINTERFACE
    2424#include <dsound.h>
    2525
     
    4242{
    4343   lpVtbl = &Vtbl;
    44    Vtbl.AddRef               = SoundAddRef;
    45    Vtbl.Release              = SoundRelease;
    46    Vtbl.QueryInterface       = SoundQueryInterface;
    47    Vtbl.Compact              = SoundCompact;
    48    Vtbl.CreateSoundBuffer    = SoundCreateSoundBuffer;
    49    Vtbl.GetCaps              = SoundGetCaps;
    50    Vtbl.DuplicateSoundBuffer = SoundDuplicateSoundBuffer;
    51    Vtbl.SetCooperativeLevel  = SoundSetCooperativeLevel;
    52    Vtbl.Compact              = SoundCompact;
    53    Vtbl.GetSpeakerConfig     = SoundGetSpeakerConfig;
    54    Vtbl.SetSpeakerConfig     = SoundSetSpeakerConfig;
    55    Vtbl.Initialize           = SoundInitialize;
     44   Vtbl.fnAddRef               = SoundAddRef;
     45   Vtbl.fnRelease              = SoundRelease;
     46   Vtbl.fnQueryInterface       = SoundQueryInterface;
     47   Vtbl.fnCompact              = SoundCompact;
     48   Vtbl.fnCreateSoundBuffer    = SoundCreateSoundBuffer;
     49   Vtbl.fnGetCaps              = SoundGetCaps;
     50   Vtbl.fnDuplicateSoundBuffer = SoundDuplicateSoundBuffer;
     51   Vtbl.fnSetCooperativeLevel  = SoundSetCooperativeLevel;
     52   Vtbl.fnCompact              = SoundCompact;
     53   Vtbl.fnGetSpeakerConfig     = SoundGetSpeakerConfig;
     54   Vtbl.fnSetSpeakerConfig     = SoundSetSpeakerConfig;
     55   Vtbl.fnInitialize           = SoundInitialize;
    5656
    5757   dprintf(("DSOUND-OS2IDirectSound::OS2IDirectSound"));
     
    7575      return;
    7676   }
    77    primary->Vtbl.AddRef(primary);
     77   primary->Vtbl.fnAddRef(primary);
    7878
    7979   dprintf(("Sound init OK"));
     
    9999   *ppvObj = NULL;
    100100
    101    if (!IsEqualGUID(riid, CLSID_DirectSound) &&
    102        !IsEqualGUID(riid, IID_IDirectSound))
     101   if (!IsEqualGUID(riid, &CLSID_DirectSound) &&
     102       !IsEqualGUID(riid, &IID_IDirectSound))
    103103      return E_NOINTERFACE;
    104104
     
    181181      return lastErr;
    182182   }
    183    sndbuf->Vtbl.AddRef(sndbuf);
     183   sndbuf->Vtbl.fnAddRef(sndbuf);
    184184
    185185   *lplpDirectSoundBuffer = (LPDIRECTSOUNDBUFFER)sndbuf;
     
    251251      return lastErr;
    252252   }
    253    tgtBuf->Vtbl.AddRef(tgtBuf);
     253   tgtBuf->Vtbl.fnAddRef(tgtBuf);
    254254
    255255   *lplpDirectSoundBuffer = (LPDIRECTSOUNDBUFFER)tgtBuf;
  • trunk/src/dsound/OS2NOTIFY.CPP

    r3925 r21479  
    1919#include <string.h>
    2020
    21 #define INITGUID
     21#define CINTERFACE
    2222#include <dsound.h>
    2323
     
    3232{
    3333   lpVtbl = &Vtbl;
    34    Vtbl.AddRef                   = SoundNotifyAddRef;
    35    Vtbl.Release                  = SoundNotifyRelease;
    36    Vtbl.QueryInterface           = SoundNotifyQueryInterface;
    37    Vtbl.SetNotificationPositions = SoundNotifySetNotificationPositions;
     34   Vtbl.fnAddRef                   = SoundNotifyAddRef;
     35   Vtbl.fnRelease                  = SoundNotifyRelease;
     36   Vtbl.fnQueryInterface           = SoundNotifyQueryInterface;
     37   Vtbl.fnSetNotificationPositions = SoundNotifySetNotificationPositions;
    3838
    3939   dprintf(("DSOUND-OS2IDirectSoundNotify::OS2IDirectSoundNotify (this=%X)", this));
     
    4545
    4646   // add a reference to the parent SoundBuffer to make sure it won't suddenly disappear
    47    lpSoundBuffer->Vtbl.AddRef(lpSoundBuffer);
     47   lpSoundBuffer->Vtbl.fnAddRef(lpSoundBuffer);
    4848   // set pointer to ourselves in parent SoundBuffer
    4949   lpSoundBuffer->SetNotify(this);
     
    5656   dprintf(("DSOUND-OS2IDirectSoundNotify::~OS2IDirectSoundNotify (this=%X)", this));
    5757   lpSoundBuffer->SetNotify(NULL);
    58    lpSoundBuffer->Vtbl.Release(lpSoundBuffer);
     58   lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer);
    5959   if (lpPositions != NULL)
    6060      free(lpPositions);
     
    7171   *ppvObj = NULL;
    7272
    73    if (!IsEqualGUID(riid, IID_IDirectSoundNotify))
     73   if (!IsEqualGUID(riid, &IID_IDirectSoundNotify))
    7474      return E_NOINTERFACE;
    7575
  • trunk/src/dsound/OS2PrimBuff.cpp

    r5285 r21479  
    3333#include <string.h>
    3434
    35 #define INITGUID
     35#define CINTERFACE
    3636#include <dsound.h>
    3737
     
    5555{
    5656   lpVtbl = &Vtbl;
    57    Vtbl.AddRef               = PrimBufAddRef;
    58    Vtbl.Release              = PrimBufRelease;
    59    Vtbl.QueryInterface       = PrimBufQueryInterface;
    60    Vtbl.GetCaps              = PrimBufGetCaps;
    61    Vtbl.GetFormat            = PrimBufGetFormat;
    62    Vtbl.GetVolume            = PrimBufGetVolume;
    63    Vtbl.GetStatus            = PrimBufGetStatus;
    64    Vtbl.GetCurrentPosition   = PrimBufGetCurrentPosition;
    65    Vtbl.GetPan               = PrimBufGetPan;
    66    Vtbl.GetFrequency         = PrimBufGetFrequency;
    67    Vtbl.Initialize           = PrimBufInitialize;
    68    Vtbl.Restore              = PrimBufRestore;
    69    Vtbl.SetFormat            = PrimBufSetFormat;
    70    Vtbl.SetVolume            = PrimBufSetVolume;
    71    Vtbl.SetCurrentPosition   = PrimBufSetCurrentPosition;
    72    Vtbl.SetPan               = PrimBufSetPan;
    73    Vtbl.SetFrequency         = PrimBufSetFrequency;
    74    Vtbl.Lock                 = PrimBufLock;
    75    Vtbl.Unlock               = PrimBufUnlock;
    76    Vtbl.Stop                 = PrimBufStop;
    77    Vtbl.Play                 = PrimBufPlay;
     57   Vtbl.fnAddRef               = PrimBufAddRef;
     58   Vtbl.fnRelease              = PrimBufRelease;
     59   Vtbl.fnQueryInterface       = PrimBufQueryInterface;
     60   Vtbl.fnGetCaps              = PrimBufGetCaps;
     61   Vtbl.fnGetFormat            = PrimBufGetFormat;
     62   Vtbl.fnGetVolume            = PrimBufGetVolume;
     63   Vtbl.fnGetStatus            = PrimBufGetStatus;
     64   Vtbl.fnGetCurrentPosition   = PrimBufGetCurrentPosition;
     65   Vtbl.fnGetPan               = PrimBufGetPan;
     66   Vtbl.fnGetFrequency         = PrimBufGetFrequency;
     67   Vtbl.fnInitialize           = PrimBufInitialize;
     68   Vtbl.fnRestore              = PrimBufRestore;
     69   Vtbl.fnSetFormat            = PrimBufSetFormat;
     70   Vtbl.fnSetVolume            = PrimBufSetVolume;
     71   Vtbl.fnSetCurrentPosition   = PrimBufSetCurrentPosition;
     72   Vtbl.fnSetPan               = PrimBufSetPan;
     73   Vtbl.fnSetFrequency         = PrimBufSetFrequency;
     74   Vtbl.fnLock                 = PrimBufLock;
     75   Vtbl.fnUnlock               = PrimBufUnlock;
     76   Vtbl.fnStop                 = PrimBufStop;
     77   Vtbl.fnPlay                 = PrimBufPlay;
    7878
    7979   dprintf(("DSOUND-PrimBuff: Constructor"));
     
    135135   *ppvObj = NULL;
    136136
    137    if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {
     137   if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) {
    138138      *ppvObj = This;
    139139      PrimBufAddRef(This);
     
    142142
    143143
    144    if (IsEqualGUID(riid, IID_IDirectSound3DListener)) {
     144   if (IsEqualGUID(riid, &IID_IDirectSound3DListener)) {
    145145      OS2PrimBuff                *me = (OS2PrimBuff *)This;
    146146      OS2IDirectSound3DListener  *listener;
     
    148148      listener     = new OS2IDirectSound3DListener(me);
    149149      *ppvObj      = listener;
    150       listener->Vtbl.AddRef((IDirectSound3DListener *)listener);
     150      listener->Vtbl.fnAddRef((IDirectSound3DListener *)listener);
    151151      return DS_OK;
    152152   }
  • trunk/src/dsound/OS2SNDBUFFER.CPP

    r5331 r21479  
    2121#include <string.h>
    2222
    23 #define INITGUID
     23#define CINTERFACE
    2424#include <dsound.h>
    2525
     
    5252   //This is the "normal" constructor
    5353   lpVtbl = &Vtbl;
    54    Vtbl.AddRef               = SoundBufAddRef;
    55    Vtbl.Release              = SoundBufRelease;
    56    Vtbl.QueryInterface       = SoundBufQueryInterface;
    57    Vtbl.GetCaps              = SoundBufGetCaps;
    58    Vtbl.GetFormat            = SoundBufGetFormat;
    59    Vtbl.GetVolume            = SoundBufGetVolume;
    60    Vtbl.GetStatus            = SoundBufGetStatus;
    61    Vtbl.GetCurrentPosition   = SoundBufGetCurrentPosition;
    62    Vtbl.GetPan               = SoundBufGetPan;
    63    Vtbl.GetFrequency         = SoundBufGetFrequency;
    64    Vtbl.Initialize           = SoundBufInitialize;
    65    Vtbl.Restore              = SoundBufRestore;
    66    Vtbl.SetFormat            = SoundBufSetFormat;
    67    Vtbl.SetVolume            = SoundBufSetVolume;
    68    Vtbl.SetCurrentPosition   = SoundBufSetCurrentPosition;
    69    Vtbl.SetPan               = SoundBufSetPan;
    70    Vtbl.SetFrequency         = SoundBufSetFrequency;
    71    Vtbl.Lock                 = SoundBufLock;
    72    Vtbl.Unlock               = SoundBufUnlock;
    73    Vtbl.Stop                 = SoundBufStop;
    74    Vtbl.Play                 = SoundBufPlay;
     54   Vtbl.fnAddRef               = SoundBufAddRef;
     55   Vtbl.fnRelease              = SoundBufRelease;
     56   Vtbl.fnQueryInterface       = SoundBufQueryInterface;
     57   Vtbl.fnGetCaps              = SoundBufGetCaps;
     58   Vtbl.fnGetFormat            = SoundBufGetFormat;
     59   Vtbl.fnGetVolume            = SoundBufGetVolume;
     60   Vtbl.fnGetStatus            = SoundBufGetStatus;
     61   Vtbl.fnGetCurrentPosition   = SoundBufGetCurrentPosition;
     62   Vtbl.fnGetPan               = SoundBufGetPan;
     63   Vtbl.fnGetFrequency         = SoundBufGetFrequency;
     64   Vtbl.fnInitialize           = SoundBufInitialize;
     65   Vtbl.fnRestore              = SoundBufRestore;
     66   Vtbl.fnSetFormat            = SoundBufSetFormat;
     67   Vtbl.fnSetVolume            = SoundBufSetVolume;
     68   Vtbl.fnSetCurrentPosition   = SoundBufSetCurrentPosition;
     69   Vtbl.fnSetPan               = SoundBufSetPan;
     70   Vtbl.fnSetFrequency         = SoundBufSetFrequency;
     71   Vtbl.fnLock                 = SoundBufLock;
     72   Vtbl.fnUnlock               = SoundBufUnlock;
     73   Vtbl.fnStop                 = SoundBufStop;
     74   Vtbl.fnPlay                 = SoundBufPlay;
    7575
    7676   dprintf(("DSOUND-OS2IDirectSoundBuffer::OS2IDirectSoundBuffer (buf=%X)", this));
     
    9494   // destroyed; moreover if the user didn't create  a primary buffer himself/herself,
    9595   // it will automatically get created and destroyed with the last secondary buffer
    96    primary->Vtbl.AddRef(primary);
     96   primary->Vtbl.fnAddRef(primary);
    9797
    9898   // Start playing the primary buffer
    9999   // TODO: only start playing the primary buffer when necessary!
    100    OS2IDirectSoundBuffer::primary->Vtbl.Play(OS2IDirectSoundBuffer::primary, 0, 0, DSBPLAY_LOOPING);
     100   OS2IDirectSoundBuffer::primary->Vtbl.fnPlay(OS2IDirectSoundBuffer::primary, 0, 0, DSBPLAY_LOOPING);
    101101
    102102   parentDS  = DSound;
     
    156156   //This is the constructor used for duplicating sound buffers
    157157   lpVtbl = &Vtbl;
    158    Vtbl.AddRef               = SoundBufAddRef;
    159    Vtbl.Release              = SoundBufRelease;
    160    Vtbl.QueryInterface       = SoundBufQueryInterface;
    161    Vtbl.GetCaps              = SoundBufGetCaps;
    162    Vtbl.GetFormat            = SoundBufGetFormat;
    163    Vtbl.GetVolume            = SoundBufGetVolume;
    164    Vtbl.GetStatus            = SoundBufGetStatus;
    165    Vtbl.GetCurrentPosition   = SoundBufGetCurrentPosition;
    166    Vtbl.GetPan               = SoundBufGetPan;
    167    Vtbl.GetFrequency         = SoundBufGetFrequency;
    168    Vtbl.Initialize           = SoundBufInitialize;
    169    Vtbl.Restore              = SoundBufRestore;
    170    Vtbl.SetFormat            = SoundBufSetFormat;
    171    Vtbl.SetVolume            = SoundBufSetVolume;
    172    Vtbl.SetCurrentPosition   = SoundBufSetCurrentPosition;
    173    Vtbl.SetPan               = SoundBufSetPan;
    174    Vtbl.SetFrequency         = SoundBufSetFrequency;
    175    Vtbl.Lock                 = SoundBufLock;
    176    Vtbl.Unlock               = SoundBufUnlock;
    177    Vtbl.Stop                 = SoundBufStop;
    178    Vtbl.Play                 = SoundBufPlay;
     158   Vtbl.fnAddRef               = SoundBufAddRef;
     159   Vtbl.fnRelease              = SoundBufRelease;
     160   Vtbl.fnQueryInterface       = SoundBufQueryInterface;
     161   Vtbl.fnGetCaps              = SoundBufGetCaps;
     162   Vtbl.fnGetFormat            = SoundBufGetFormat;
     163   Vtbl.fnGetVolume            = SoundBufGetVolume;
     164   Vtbl.fnGetStatus            = SoundBufGetStatus;
     165   Vtbl.fnGetCurrentPosition   = SoundBufGetCurrentPosition;
     166   Vtbl.fnGetPan               = SoundBufGetPan;
     167   Vtbl.fnGetFrequency         = SoundBufGetFrequency;
     168   Vtbl.fnInitialize           = SoundBufInitialize;
     169   Vtbl.fnRestore              = SoundBufRestore;
     170   Vtbl.fnSetFormat            = SoundBufSetFormat;
     171   Vtbl.fnSetVolume            = SoundBufSetVolume;
     172   Vtbl.fnSetCurrentPosition   = SoundBufSetCurrentPosition;
     173   Vtbl.fnSetPan               = SoundBufSetPan;
     174   Vtbl.fnSetFrequency         = SoundBufSetFrequency;
     175   Vtbl.fnLock                 = SoundBufLock;
     176   Vtbl.fnUnlock               = SoundBufUnlock;
     177   Vtbl.fnStop                 = SoundBufStop;
     178   Vtbl.fnPlay                 = SoundBufPlay;
    179179
    180180   dprintf(("DSOUND-OS2IDirectSoundBuffer::OS2IDirectSoundBuffer/Duplicate (buf=%X)", this));
     
    197197   // destroyed; moreover if the user didn't create  a primary buffer himself/herself,
    198198   // it will automatically get created and destroyed with the last secondary buffer
    199    primary->Vtbl.AddRef(primary);
     199   primary->Vtbl.fnAddRef(primary);
    200200
    201201   parentDS  = DSound;
     
    259259
    260260   // release the primary buffer too
    261    primary->Vtbl.Release(primary);
     261   primary->Vtbl.fnRelease(primary);
    262262
    263263   if (this == dsbroot)  // is this the first SoundBuffer?
     
    284284
    285285   if (primary != NULL)
    286       primary->Vtbl.Stop(primary);
     286      primary->Vtbl.fnStop(primary);
    287287
    288288   while (cur != NULL) {
     
    293293   dprintf(("DSOUND-OS2IDirectSoundBuffer::DestroyAllBuffers - %X", primary));
    294294   if (primary != NULL)
    295       primary->Vtbl.Release(primary);
     295      primary->Vtbl.fnRelease(primary);
    296296}
    297297
     
    306306   *ppvObj = NULL;
    307307
    308    if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {
     308   if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) {
    309309      *ppvObj = This;
    310310
     
    313313   }
    314314
    315    if (IsEqualGUID(riid, IID_IDirectSoundNotify)) {
     315   if (IsEqualGUID(riid, &IID_IDirectSoundNotify)) {
    316316      OS2IDirectSoundBuffer  *me     = (OS2IDirectSoundBuffer *)This;
    317317      OS2IDirectSoundNotify  *notify;
     
    319319      notify     = new OS2IDirectSoundNotify(me);
    320320      *ppvObj    = notify;
    321       notify->Vtbl.AddRef(notify);
     321      notify->Vtbl.fnAddRef(notify);
    322322      return DS_OK;
    323323   }
    324324
    325    if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {
     325   if (IsEqualGUID(riid, &IID_IDirectSound3DBuffer)) {
    326326      OS2IDirectSoundBuffer   *me     = (OS2IDirectSoundBuffer *)This;
    327327      OS2IDirectSound3DBuffer *buffer3D;
     
    329329      buffer3D   = new OS2IDirectSound3DBuffer(me);
    330330      *ppvObj    = buffer3D;
    331       buffer3D->Vtbl.AddRef((IDirectSound3DBuffer *)buffer3D);
     331      buffer3D->Vtbl.fnAddRef((IDirectSound3DBuffer *)buffer3D);
    332332      return DS_OK;
    333333   }
  • trunk/src/dsound/dsmixer.cpp

    r21342 r21479  
    2020#include <string.h>
    2121
    22 #define INITGUID
     22#define CINTERFACE
    2323#include <dsound.h>
    2424
Note: See TracChangeset for help on using the changeset viewer.