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;
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->dnDevNode = WInDev[This->wDevID].waveDesc.dnDevNode;
pDesc->wVxdId = 0;
@ -1026,7 +1026,7 @@ DWORD widDsCreate(UINT wDevID, PIDSCDRIVER* drv)
*/
DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{
memcpy(desc, &(WInDev[wDevID].ds_desc), sizeof(DSDRIVERDESC));
*desc = WInDev[wDevID].ds_desc;
return MMSYSERR_NOERROR;
}

View File

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

View File

@ -1128,7 +1128,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
if (!type)
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
* Does not seem to be a problem, because in mmsystem.h only
@ -1184,7 +1184,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
if (!type)
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
* Does not seem to be a problem, because in mmsystem.h only

View File

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