Changeset 21479 for trunk/src/dsound
- Timestamp:
- Nov 27, 2010, 11:27:43 AM (15 years ago)
- Location:
- trunk/src/dsound
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dsound/DAudioBuffer.cpp
r8217 r21479 20 20 #include <string.h> 21 21 22 #define INITGUID22 #define CINTERFACE 23 23 #include <dsound.h> 24 24 … … 186 186 { 187 187 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; 209 209 } 210 210 //****************************************************************************** … … 233 233 *ppvObj = NULL; 234 234 235 if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {235 if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) { 236 236 *ppvObj = this; 237 237 … … 240 240 } 241 241 242 if (IsEqualGUID(riid, IID_IDirectSoundNotify))242 if (IsEqualGUID(riid, &IID_IDirectSoundNotify)) 243 243 { 244 244 IDirectAudioNotify *notify; … … 246 246 notify = new IDirectAudioNotify(this); 247 247 *ppvObj = notify; 248 notify->Vtbl. AddRef(notify);248 notify->Vtbl.fnAddRef(notify); 249 249 return DS_OK; 250 250 } 251 251 #if 0 252 if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {252 if (IsEqualGUID(riid, &IID_IDirectSound3DBuffer)) { 253 253 OS2IDirectSound3DBuffer *buffer3D; 254 254 255 255 buffer3D = new OS2IDirectSound3DBuffer(this); 256 256 *ppvObj = buffer3D; 257 buffer3D->Vtbl. AddRef((IDirectSound3DBuffer *)buffer3D);257 buffer3D->Vtbl.fnAddRef((IDirectSound3DBuffer *)buffer3D); 258 258 return DS_OK; 259 259 } -
trunk/src/dsound/DAudioNotify.cpp
r5608 r21479 19 19 #include <string.h> 20 20 21 #define INITGUID21 #define CINTERFACE 22 22 #include <dsound.h> 23 23 … … 32 32 { 33 33 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; 38 38 39 39 dprintf(("DSOUND-IDirectAudioNotify::IDirectAudioNotify (this=%X)", this)); … … 45 45 46 46 // 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); 48 48 // set pointer to ourselves in parent SoundBuffer 49 49 lpSoundBuffer->SetNotify(this); … … 56 56 dprintf(("DSOUND-IDirectAudioNotify::~IDirectAudioNotify (this=%X)", this)); 57 57 lpSoundBuffer->SetNotify(NULL); 58 lpSoundBuffer->Vtbl. Release(lpSoundBuffer);58 lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer); 59 59 if (lpPositions != NULL) 60 60 free(lpPositions); … … 71 71 *ppvObj = NULL; 72 72 73 if (!IsEqualGUID(riid, IID_IDirectSoundNotify))73 if (!IsEqualGUID(riid, &IID_IDirectSoundNotify)) 74 74 return E_NOINTERFACE; 75 75 -
trunk/src/dsound/DSOUND.CPP
r7431 r21479 20 20 21 21 #define INITGUID 22 #define ICOM_CINTERFACE 123 22 #define CINTERFACE 24 23 #include <dsound.h> … … 45 44 if (OS2IDirectSound::fDSExists) { 46 45 *ppDS = (LPDIRECTSOUND)DS; 47 DS->Vtbl. AddRef(DS);46 DS->Vtbl.fnAddRef(DS); 48 47 return DS_OK; 49 48 } … … 61 60 else { 62 61 *ppDS = (LPDIRECTSOUND)newsound; 63 newsound->Vtbl. AddRef(newsound);62 newsound->Vtbl.fnAddRef(newsound); 64 63 DS = newsound; 65 64 } … … 178 177 179 178 dprintf(("DSOUND:DSCF_CreateInstance\n")); 180 if( lpGUID && (*lpGUID == IID_IDirectSound)) {179 if(lpGUID && IsEqualGUID(lpGUID, &IID_IDirectSound)) { 181 180 return OS2DirectSoundCreate(lpGUID,(LPDIRECTSOUND*)ppobj,pOuter); 182 181 } … … 223 222 { 224 223 *ppv = (LPVOID)&DSOUND_CF; 225 DSOUND_CF.lpvtbl-> AddRef((IClassFactory*)&DSOUND_CF);224 DSOUND_CF.lpvtbl->fnAddRef((IClassFactory*)&DSOUND_CF); 226 225 return S_OK; 227 226 } -
trunk/src/dsound/OS23DBuffer.cpp
r3925 r21479 19 19 #include <string.h> 20 20 21 #define INITGUID21 #define CINTERFACE 22 22 #include <dsound.h> 23 23 … … 42 42 { 43 43 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; 65 65 66 66 … … 74 74 75 75 // 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); 77 77 // set pointer to ourselves in parent SoundBuffer 78 78 lpSoundBuffer->Set3DBuffer(this); … … 85 85 dprintf(("DSOUND-OS2IDirectSound3DBuffer::~OS2IDirectSound3DBuffer (this=%X)", this)); 86 86 lpSoundBuffer->Set3DBuffer(NULL); 87 lpSoundBuffer->Vtbl. Release(lpSoundBuffer);87 lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer); 88 88 } 89 89 … … 98 98 *ppvObj = NULL; 99 99 100 if (!IsEqualGUID(riid, IID_IDirectSound3DBuffer))100 if (!IsEqualGUID(riid, &IID_IDirectSound3DBuffer)) 101 101 return E_NOINTERFACE; 102 102 -
trunk/src/dsound/OS23DListener.cpp
r3925 r21479 19 19 #include <string.h> 20 20 21 #define INITGUID21 #define CINTERFACE 22 22 #include <dsound.h> 23 23 … … 42 42 { 43 43 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; 62 62 63 63 … … 71 71 72 72 // 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); 74 74 // set pointer to ourselves in parent SoundBuffer 75 75 lpSoundBuffer->Set3DListener(this); … … 82 82 dprintf(("DSOUND-OS2IDirectSound3DListener::~OS2IDirectSound3DListener (this=%X)", this)); 83 83 lpSoundBuffer->Set3DListener(NULL); 84 lpSoundBuffer->Vtbl. Release(lpSoundBuffer);84 lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer); 85 85 } 86 86 … … 95 95 *ppvObj = NULL; 96 96 97 if (!IsEqualGUID(riid, IID_IDirectSound3DListener))97 if (!IsEqualGUID(riid, &IID_IDirectSound3DListener)) 98 98 return E_NOINTERFACE; 99 99 -
trunk/src/dsound/OS2DSOUND.CPP
r5292 r21479 21 21 #include <stdio.h> /****** DEBUGGING ********/ 22 22 23 #define INITGUID23 #define CINTERFACE 24 24 #include <dsound.h> 25 25 … … 42 42 { 43 43 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; 56 56 57 57 dprintf(("DSOUND-OS2IDirectSound::OS2IDirectSound")); … … 75 75 return; 76 76 } 77 primary->Vtbl. AddRef(primary);77 primary->Vtbl.fnAddRef(primary); 78 78 79 79 dprintf(("Sound init OK")); … … 99 99 *ppvObj = NULL; 100 100 101 if (!IsEqualGUID(riid, CLSID_DirectSound) &&102 !IsEqualGUID(riid, IID_IDirectSound))101 if (!IsEqualGUID(riid, &CLSID_DirectSound) && 102 !IsEqualGUID(riid, &IID_IDirectSound)) 103 103 return E_NOINTERFACE; 104 104 … … 181 181 return lastErr; 182 182 } 183 sndbuf->Vtbl. AddRef(sndbuf);183 sndbuf->Vtbl.fnAddRef(sndbuf); 184 184 185 185 *lplpDirectSoundBuffer = (LPDIRECTSOUNDBUFFER)sndbuf; … … 251 251 return lastErr; 252 252 } 253 tgtBuf->Vtbl. AddRef(tgtBuf);253 tgtBuf->Vtbl.fnAddRef(tgtBuf); 254 254 255 255 *lplpDirectSoundBuffer = (LPDIRECTSOUNDBUFFER)tgtBuf; -
trunk/src/dsound/OS2NOTIFY.CPP
r3925 r21479 19 19 #include <string.h> 20 20 21 #define INITGUID21 #define CINTERFACE 22 22 #include <dsound.h> 23 23 … … 32 32 { 33 33 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; 38 38 39 39 dprintf(("DSOUND-OS2IDirectSoundNotify::OS2IDirectSoundNotify (this=%X)", this)); … … 45 45 46 46 // 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); 48 48 // set pointer to ourselves in parent SoundBuffer 49 49 lpSoundBuffer->SetNotify(this); … … 56 56 dprintf(("DSOUND-OS2IDirectSoundNotify::~OS2IDirectSoundNotify (this=%X)", this)); 57 57 lpSoundBuffer->SetNotify(NULL); 58 lpSoundBuffer->Vtbl. Release(lpSoundBuffer);58 lpSoundBuffer->Vtbl.fnRelease(lpSoundBuffer); 59 59 if (lpPositions != NULL) 60 60 free(lpPositions); … … 71 71 *ppvObj = NULL; 72 72 73 if (!IsEqualGUID(riid, IID_IDirectSoundNotify))73 if (!IsEqualGUID(riid, &IID_IDirectSoundNotify)) 74 74 return E_NOINTERFACE; 75 75 -
trunk/src/dsound/OS2PrimBuff.cpp
r5285 r21479 33 33 #include <string.h> 34 34 35 #define INITGUID35 #define CINTERFACE 36 36 #include <dsound.h> 37 37 … … 55 55 { 56 56 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; 78 78 79 79 dprintf(("DSOUND-PrimBuff: Constructor")); … … 135 135 *ppvObj = NULL; 136 136 137 if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {137 if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) { 138 138 *ppvObj = This; 139 139 PrimBufAddRef(This); … … 142 142 143 143 144 if (IsEqualGUID(riid, IID_IDirectSound3DListener)) {144 if (IsEqualGUID(riid, &IID_IDirectSound3DListener)) { 145 145 OS2PrimBuff *me = (OS2PrimBuff *)This; 146 146 OS2IDirectSound3DListener *listener; … … 148 148 listener = new OS2IDirectSound3DListener(me); 149 149 *ppvObj = listener; 150 listener->Vtbl. AddRef((IDirectSound3DListener *)listener);150 listener->Vtbl.fnAddRef((IDirectSound3DListener *)listener); 151 151 return DS_OK; 152 152 } -
trunk/src/dsound/OS2SNDBUFFER.CPP
r5331 r21479 21 21 #include <string.h> 22 22 23 #define INITGUID23 #define CINTERFACE 24 24 #include <dsound.h> 25 25 … … 52 52 //This is the "normal" constructor 53 53 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; 75 75 76 76 dprintf(("DSOUND-OS2IDirectSoundBuffer::OS2IDirectSoundBuffer (buf=%X)", this)); … … 94 94 // destroyed; moreover if the user didn't create a primary buffer himself/herself, 95 95 // it will automatically get created and destroyed with the last secondary buffer 96 primary->Vtbl. AddRef(primary);96 primary->Vtbl.fnAddRef(primary); 97 97 98 98 // Start playing the primary buffer 99 99 // 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); 101 101 102 102 parentDS = DSound; … … 156 156 //This is the constructor used for duplicating sound buffers 157 157 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; 179 179 180 180 dprintf(("DSOUND-OS2IDirectSoundBuffer::OS2IDirectSoundBuffer/Duplicate (buf=%X)", this)); … … 197 197 // destroyed; moreover if the user didn't create a primary buffer himself/herself, 198 198 // it will automatically get created and destroyed with the last secondary buffer 199 primary->Vtbl. AddRef(primary);199 primary->Vtbl.fnAddRef(primary); 200 200 201 201 parentDS = DSound; … … 259 259 260 260 // release the primary buffer too 261 primary->Vtbl. Release(primary);261 primary->Vtbl.fnRelease(primary); 262 262 263 263 if (this == dsbroot) // is this the first SoundBuffer? … … 284 284 285 285 if (primary != NULL) 286 primary->Vtbl. Stop(primary);286 primary->Vtbl.fnStop(primary); 287 287 288 288 while (cur != NULL) { … … 293 293 dprintf(("DSOUND-OS2IDirectSoundBuffer::DestroyAllBuffers - %X", primary)); 294 294 if (primary != NULL) 295 primary->Vtbl. Release(primary);295 primary->Vtbl.fnRelease(primary); 296 296 } 297 297 … … 306 306 *ppvObj = NULL; 307 307 308 if (IsEqualGUID(riid, IID_IDirectSoundBuffer)) {308 if (IsEqualGUID(riid, &IID_IDirectSoundBuffer)) { 309 309 *ppvObj = This; 310 310 … … 313 313 } 314 314 315 if (IsEqualGUID(riid, IID_IDirectSoundNotify)) {315 if (IsEqualGUID(riid, &IID_IDirectSoundNotify)) { 316 316 OS2IDirectSoundBuffer *me = (OS2IDirectSoundBuffer *)This; 317 317 OS2IDirectSoundNotify *notify; … … 319 319 notify = new OS2IDirectSoundNotify(me); 320 320 *ppvObj = notify; 321 notify->Vtbl. AddRef(notify);321 notify->Vtbl.fnAddRef(notify); 322 322 return DS_OK; 323 323 } 324 324 325 if (IsEqualGUID(riid, IID_IDirectSound3DBuffer)) {325 if (IsEqualGUID(riid, &IID_IDirectSound3DBuffer)) { 326 326 OS2IDirectSoundBuffer *me = (OS2IDirectSoundBuffer *)This; 327 327 OS2IDirectSound3DBuffer *buffer3D; … … 329 329 buffer3D = new OS2IDirectSound3DBuffer(me); 330 330 *ppvObj = buffer3D; 331 buffer3D->Vtbl. AddRef((IDirectSound3DBuffer *)buffer3D);331 buffer3D->Vtbl.fnAddRef((IDirectSound3DBuffer *)buffer3D); 332 332 return DS_OK; 333 333 } -
trunk/src/dsound/dsmixer.cpp
r21342 r21479 20 20 #include <string.h> 21 21 22 #define INITGUID22 #define CINTERFACE 23 23 #include <dsound.h> 24 24
Note:
See TracChangeset
for help on using the changeset viewer.