dsound: Assign to structs instead of using CopyMemory.

This commit is contained in:
Andrew Talbot 2008-03-29 11:37:12 +00:00 committed by Alexandre Julliard
parent cb7b58c528
commit e8aebfcb4b
3 changed files with 5 additions and 5 deletions

View File

@ -1366,7 +1366,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
if (wfex->wFormatTag == WAVE_FORMAT_PCM) {
device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX));
CopyMemory(device->pwfx, wfex, sizeof(WAVEFORMATEX));
*device->pwfx = *wfex;
device->pwfx->cbSize = 0;
} else {
device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX)+wfex->cbSize);

View File

@ -254,19 +254,19 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
CopyMemory(pGuidDest, &DSOUND_renderer_guids[ds_default_playback], sizeof(GUID));
*pGuidDest = DSOUND_renderer_guids[ds_default_playback];
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
CopyMemory(pGuidDest, &DSOUND_capture_guids[ds_default_capture], sizeof(GUID));
*pGuidDest = DSOUND_capture_guids[ds_default_capture];
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
CopyMemory(pGuidDest, pGuidSrc, sizeof(GUID));
*pGuidDest = *pGuidSrc;
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;

View File

@ -1173,7 +1173,7 @@ HRESULT PrimaryBufferImpl_Create(
dsb->device = device;
dsb->lpVtbl = &dspbvt;
CopyMemory(&device->dsbd, dsbd, sizeof(*dsbd));
device->dsbd = *dsbd;
TRACE("Created primary buffer at %p\n", dsb);
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"