winealsa.drv: Assign to structs instead of using memcpy.

This commit is contained in:
Andrew Talbot 2008-03-24 21:37:37 +00:00 committed by Alexandre Julliard
parent ddfefc036f
commit 687af6b2bc
5 changed files with 11 additions and 11 deletions

View File

@ -850,7 +850,7 @@ static HRESULT WINAPI IDsCaptureDriverImpl_GetDriverDesc(PIDSCDRIVER iface, PDSD
{ {
IDsCaptureDriverImpl *This = (IDsCaptureDriverImpl *)iface; IDsCaptureDriverImpl *This = (IDsCaptureDriverImpl *)iface;
TRACE("(%p,%p)\n",iface,pDesc); TRACE("(%p,%p)\n",iface,pDesc);
memcpy(pDesc, &(WInDev[This->wDevID].ds_desc), sizeof(DSDRIVERDESC)); *pDesc = WInDev[This->wDevID].ds_desc;
pDesc->dwFlags = 0; pDesc->dwFlags = 0;
pDesc->dnDevNode = WInDev[This->wDevID].waveDesc.dnDevNode; pDesc->dnDevNode = WInDev[This->wDevID].waveDesc.dnDevNode;
pDesc->wVxdId = 0; pDesc->wVxdId = 0;
@ -1026,7 +1026,7 @@ DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv)
*/ */
DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc) DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memcpy(desc, &(WInDev[wDevID].ds_desc), sizeof(DSDRIVERDESC)); *desc = WInDev[wDevID].ds_desc;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }

View File

@ -661,7 +661,7 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDES
{ {
IDsDriverImpl *This = (IDsDriverImpl *)iface; IDsDriverImpl *This = (IDsDriverImpl *)iface;
TRACE("(%p,%p)\n",iface,pDesc); TRACE("(%p,%p)\n",iface,pDesc);
memcpy(pDesc, &(WOutDev[This->wDevID].ds_desc), sizeof(DSDRIVERDESC)); *pDesc = WOutDev[This->wDevID].ds_desc;
pDesc->dwFlags = DSDDESC_DONTNEEDSECONDARYLOCK | DSDDESC_DONTNEEDWRITELEAD; pDesc->dwFlags = DSDDESC_DONTNEEDSECONDARYLOCK | DSDDESC_DONTNEEDWRITELEAD;
pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode; pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode;
pDesc->wVxdId = 0; pDesc->wVxdId = 0;
@ -730,7 +730,7 @@ static HRESULT WINAPI IDsDriverImpl_GetCaps(PIDSDRIVER iface, PDSDRIVERCAPS pCap
{ {
IDsDriverImpl *This = (IDsDriverImpl *)iface; IDsDriverImpl *This = (IDsDriverImpl *)iface;
TRACE("(%p,%p)\n",iface,pCaps); TRACE("(%p,%p)\n",iface,pCaps);
memcpy(pCaps, &(WOutDev[This->wDevID].ds_caps), sizeof(DSDRIVERCAPS)); *pCaps = WOutDev[This->wDevID].ds_caps;
return DS_OK; return DS_OK;
} }
@ -844,7 +844,7 @@ DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv)
DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memcpy(desc, &(WOutDev[wDevID].ds_desc), sizeof(DSDRIVERDESC)); *desc = WOutDev[wDevID].ds_desc;
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }

View File

@ -1128,8 +1128,8 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
if (!type) if (!type)
return; return;
memcpy(&MidiOutDev[MODM_NumDevs].addr, snd_seq_port_info_get_addr(pinfo), sizeof(snd_seq_addr_t)); MidiOutDev[MODM_NumDevs].addr = *snd_seq_port_info_get_addr(pinfo);
/* Manufac ID. We do not have access to this with soundcard.h /* Manufac ID. We do not have access to this with soundcard.h
* Does not seem to be a problem, because in mmsystem.h only * Does not seem to be a problem, because in mmsystem.h only
* Microsoft's ID is listed. * Microsoft's ID is listed.
@ -1184,8 +1184,8 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
if (!type) if (!type)
return; return;
memcpy(&MidiInDev[MIDM_NumDevs].addr, snd_seq_port_info_get_addr(pinfo), sizeof(snd_seq_addr_t)); MidiInDev[MIDM_NumDevs].addr = *snd_seq_port_info_get_addr(pinfo);
/* Manufac ID. We do not have access to this with soundcard.h /* Manufac ID. We do not have access to this with soundcard.h
* Does not seem to be a problem, because in mmsystem.h only * Does not seem to be a problem, because in mmsystem.h only
* Microsoft's ID is listed. * Microsoft's ID is listed.

View File

@ -385,7 +385,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
memcpy(&wwi->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); wwi->waveDesc = *lpDesc;
ALSA_copyFormat(lpDesc->lpFormat, &wwi->format); ALSA_copyFormat(lpDesc->lpFormat, &wwi->format);
if (wwi->format.Format.wBitsPerSample == 0) { if (wwi->format.Format.wBitsPerSample == 0) {

View File

@ -640,7 +640,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
memcpy(&wwo->waveDesc, lpDesc, sizeof(WAVEOPENDESC)); wwo->waveDesc = *lpDesc;
ALSA_copyFormat(lpDesc->lpFormat, &wwo->format); ALSA_copyFormat(lpDesc->lpFormat, &wwo->format);
TRACE("Requested this format: %dx%dx%d %s\n", TRACE("Requested this format: %dx%dx%d %s\n",