Changeset 21479 for trunk/src/dsound/OS2SNDBUFFER.CPP
- Timestamp:
- Nov 27, 2010, 11:27:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.