Commit 7d92b5d8 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Fix structure member name to match windows headers and fix up all

uses. Nameless struct fix for dsound/propset.c to compile on both windows and wine.
parent 9dba3479
...@@ -190,8 +190,8 @@ DirectSoundCaptureEnumerateA( ...@@ -190,8 +190,8 @@ DirectSoundCaptureEnumerateA(
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvName,lpContext); "Primary Sound Capture Driver",desc.szDrvname,lpContext);
if (lpDSEnumCallback(NULL, "Primary Sound Capture Driver", desc.szDrvName, lpContext) == FALSE) if (lpDSEnumCallback(NULL, "Primary Sound Capture Driver", desc.szDrvname, lpContext) == FALSE)
return DS_OK; return DS_OK;
} }
} }
...@@ -203,8 +203,8 @@ DirectSoundCaptureEnumerateA( ...@@ -203,8 +203,8 @@ DirectSoundCaptureEnumerateA(
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvName,lpContext); debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
if (lpDSEnumCallback(&capture_guids[wid], desc.szDesc, desc.szDrvName, lpContext) == FALSE) if (lpDSEnumCallback(&capture_guids[wid], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
return DS_OK; return DS_OK;
} }
} }
...@@ -252,10 +252,10 @@ DirectSoundCaptureEnumerateW( ...@@ -252,10 +252,10 @@ DirectSoundCaptureEnumerateW(
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Capture Driver",desc.szDrvName,lpContext); "Primary Sound Capture Driver",desc.szDrvname,lpContext);
MultiByteToWideChar( CP_ACP, 0, "Primary Sound Capture Driver", -1, MultiByteToWideChar( CP_ACP, 0, "Primary Sound Capture Driver", -1,
wDesc, sizeof(wDesc)/sizeof(WCHAR) ); wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
wName, sizeof(wName)/sizeof(WCHAR) ); wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE) if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE)
return DS_OK; return DS_OK;
...@@ -269,10 +269,10 @@ DirectSoundCaptureEnumerateW( ...@@ -269,10 +269,10 @@ DirectSoundCaptureEnumerateW(
err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveInMessage((HWAVEIN)wid,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvName,lpContext); debugstr_guid(&capture_guids[wid]),desc.szDesc,desc.szDrvname,lpContext);
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
wDesc, sizeof(wDesc)/sizeof(WCHAR) ); wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
wName, sizeof(wName)/sizeof(WCHAR) ); wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback((LPGUID)&capture_guids[wid], wDesc, wName, lpContext) == FALSE) if (lpDSEnumCallback((LPGUID)&capture_guids[wid], wDesc, wName, lpContext) == FALSE)
return DS_OK; return DS_OK;
...@@ -570,8 +570,8 @@ IDirectSoundCaptureImpl_Initialize( ...@@ -570,8 +570,8 @@ IDirectSoundCaptureImpl_Initialize(
if (err == DS_OK) { if (err == DS_OK) {
This->drvcaps.dwFlags = 0; This->drvcaps.dwFlags = 0;
strncpy(This->drvdesc.szDrvName, wic.szPname, strncpy(This->drvdesc.szDrvname, wic.szPname,
sizeof(This->drvdesc.szDrvName)); sizeof(This->drvdesc.szDrvname));
This->drvcaps.dwFlags |= DSCCAPS_EMULDRIVER; This->drvcaps.dwFlags |= DSCCAPS_EMULDRIVER;
This->drvcaps.dwFormats = wic.dwFormats; This->drvcaps.dwFormats = wic.dwFormats;
......
...@@ -325,8 +325,8 @@ HRESULT WINAPI DirectSoundEnumerateA( ...@@ -325,8 +325,8 @@ HRESULT WINAPI DirectSoundEnumerateA(
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver",desc.szDrvName,lpContext); "Primary Sound Driver",desc.szDrvname,lpContext);
if (lpDSEnumCallback(NULL, "Primary Sound Driver", desc.szDrvName, lpContext) == FALSE) if (lpDSEnumCallback(NULL, "Primary Sound Driver", desc.szDrvname, lpContext) == FALSE)
return DS_OK; return DS_OK;
} }
} }
...@@ -338,8 +338,8 @@ HRESULT WINAPI DirectSoundEnumerateA( ...@@ -338,8 +338,8 @@ HRESULT WINAPI DirectSoundEnumerateA(
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvName,lpContext); debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
if (lpDSEnumCallback(&renderer_guids[wod], desc.szDesc, desc.szDrvName, lpContext) == FALSE) if (lpDSEnumCallback(&renderer_guids[wod], desc.szDesc, desc.szDrvname, lpContext) == FALSE)
return DS_OK; return DS_OK;
} }
} }
...@@ -386,10 +386,10 @@ HRESULT WINAPI DirectSoundEnumerateW( ...@@ -386,10 +386,10 @@ HRESULT WINAPI DirectSoundEnumerateW(
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(NULL,\"%s\",\"%s\",%p)\n",
"Primary Sound Driver",desc.szDrvName,lpContext); "Primary Sound Driver",desc.szDrvname,lpContext);
MultiByteToWideChar( CP_ACP, 0, "Primary Sound Driver", -1, MultiByteToWideChar( CP_ACP, 0, "Primary Sound Driver", -1,
wDesc, sizeof(wDesc)/sizeof(WCHAR) ); wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
wName, sizeof(wName)/sizeof(WCHAR) ); wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE) if (lpDSEnumCallback(NULL, wDesc, wName, lpContext) == FALSE)
return DS_OK; return DS_OK;
...@@ -403,10 +403,10 @@ HRESULT WINAPI DirectSoundEnumerateW( ...@@ -403,10 +403,10 @@ HRESULT WINAPI DirectSoundEnumerateW(
err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0)); err = mmErr(waveOutMessage((HWAVEOUT)wod,DRV_QUERYDSOUNDDESC,(DWORD)&desc,0));
if (err == DS_OK) { if (err == DS_OK) {
TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n", TRACE("calling lpDSEnumCallback(%s,\"%s\",\"%s\",%p)\n",
debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvName,lpContext); debugstr_guid(&renderer_guids[wod]),desc.szDesc,desc.szDrvname,lpContext);
MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDesc, -1,
wDesc, sizeof(wDesc)/sizeof(WCHAR) ); wDesc, sizeof(wDesc)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, desc.szDrvName, -1, MultiByteToWideChar( CP_ACP, 0, desc.szDrvname, -1,
wName, sizeof(wName)/sizeof(WCHAR) ); wName, sizeof(wName)/sizeof(WCHAR) );
if (lpDSEnumCallback(&renderer_guids[wod], wDesc, wName, lpContext) == FALSE) if (lpDSEnumCallback(&renderer_guids[wod], wDesc, wName, lpContext) == FALSE)
return DS_OK; return DS_OK;
......
...@@ -707,7 +707,7 @@ LONG ALSA_WaveInit(void) ...@@ -707,7 +707,7 @@ LONG ALSA_WaveInit(void)
wwo->caps.dwFormats = 0x00000000; wwo->caps.dwFormats = 0x00000000;
wwo->caps.dwSupport = WAVECAPS_VOLUME; wwo->caps.dwSupport = WAVECAPS_VOLUME;
strcpy(wwo->ds_desc.szDesc, "WineALSA DirectSound Driver"); strcpy(wwo->ds_desc.szDesc, "WineALSA DirectSound Driver");
strcpy(wwo->ds_desc.szDrvName, "winealsa.drv"); strcpy(wwo->ds_desc.szDrvname, "winealsa.drv");
if (!wine_dlopen("libasound.so.2", RTLD_LAZY|RTLD_GLOBAL, NULL, 0)) if (!wine_dlopen("libasound.so.2", RTLD_LAZY|RTLD_GLOBAL, NULL, 0))
{ {
...@@ -821,7 +821,7 @@ LONG ALSA_WaveInit(void) ...@@ -821,7 +821,7 @@ LONG ALSA_WaveInit(void)
wwi->caps.dwFormats = 0x00000000; wwi->caps.dwFormats = 0x00000000;
wwi->caps.dwSupport = WAVECAPS_VOLUME; wwi->caps.dwSupport = WAVECAPS_VOLUME;
strcpy(wwi->ds_desc.szDesc, "WineALSA DirectSound Driver"); strcpy(wwi->ds_desc.szDesc, "WineALSA DirectSound Driver");
strcpy(wwi->ds_desc.szDrvName, "winealsa.drv"); strcpy(wwi->ds_desc.szDrvname, "winealsa.drv");
snd_pcm_info_alloca(&info); snd_pcm_info_alloca(&info);
snd_pcm_hw_params_alloca(&hw_params); snd_pcm_hw_params_alloca(&hw_params);
......
...@@ -2111,7 +2111,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) ...@@ -2111,7 +2111,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memset(desc, 0, sizeof(*desc)); memset(desc, 0, sizeof(*desc));
strcpy(desc->szDesc, "Wine aRts DirectSound Driver"); strcpy(desc->szDesc, "Wine aRts DirectSound Driver");
strcpy(desc->szDrvName, "winearts.drv"); strcpy(desc->szDrvname, "winearts.drv");
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
......
...@@ -1501,7 +1501,7 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDES ...@@ -1501,7 +1501,7 @@ static HRESULT WINAPI IDsDriverImpl_GetDriverDesc(PIDSDRIVER iface, PDSDRIVERDES
pDesc->dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT | pDesc->dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT |
DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK; DSDDESC_USESYSTEMMEMORY | DSDDESC_DONTNEEDPRIMARYLOCK;
strcpy(pDesc->szDesc,"Wine AudioIO DirectSound Driver"); strcpy(pDesc->szDesc,"Wine AudioIO DirectSound Driver");
strcpy(pDesc->szDrvName,"wineaudioio.drv"); strcpy(pDesc->szDrvname,"wineaudioio.drv");
pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode; pDesc->dnDevNode = WOutDev[This->wDevID].waveDesc.dnDevNode;
pDesc->wVxdId = 0; pDesc->wVxdId = 0;
pDesc->wReserved = 0; pDesc->wReserved = 0;
...@@ -1678,7 +1678,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) ...@@ -1678,7 +1678,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memset(desc, 0, sizeof(*desc)); memset(desc, 0, sizeof(*desc));
strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver"); strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver");
strcpy(desc->szDrvName, "wineaudioio.drv"); strcpy(desc->szDrvname, "wineaudioio.drv");
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
...@@ -2250,7 +2250,7 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc) ...@@ -2250,7 +2250,7 @@ static DWORD widDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memset(desc, 0, sizeof(*desc)); memset(desc, 0, sizeof(*desc));
strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver"); strcpy(desc->szDesc, "Wine LIBAUDIOIO DirectSound Driver");
strcpy(desc->szDrvName, "wineaudioio.drv"); strcpy(desc->szDrvname, "wineaudioio.drv");
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
......
...@@ -1795,7 +1795,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) ...@@ -1795,7 +1795,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memset(desc, 0, sizeof(*desc)); memset(desc, 0, sizeof(*desc));
strcpy(desc->szDesc, "Wine jack DirectSound Driver"); strcpy(desc->szDesc, "Wine jack DirectSound Driver");
strcpy(desc->szDrvName, "winejack.drv"); strcpy(desc->szDrvname, "winejack.drv");
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
......
...@@ -1297,7 +1297,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc) ...@@ -1297,7 +1297,7 @@ static DWORD wodDsDesc(UINT wDevID, PDSDRIVERDESC desc)
{ {
memset(desc, 0, sizeof(*desc)); memset(desc, 0, sizeof(*desc));
strcpy(desc->szDesc, "Wine NAS DirectSound Driver"); strcpy(desc->szDesc, "Wine NAS DirectSound Driver");
strcpy(desc->szDrvName, "winenas.drv"); strcpy(desc->szDrvname, "winenas.drv");
return MMSYSERR_NOERROR; return MMSYSERR_NOERROR;
} }
......
...@@ -687,7 +687,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev) ...@@ -687,7 +687,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
mixer_info info; mixer_info info;
if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) { if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) {
strncpy(ossdev->ds_desc.szDesc, info.name, sizeof(info.name)); strncpy(ossdev->ds_desc.szDesc, info.name, sizeof(info.name));
strcpy(ossdev->ds_desc.szDrvName, "wineoss.drv"); strcpy(ossdev->ds_desc.szDrvname, "wineoss.drv");
MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name), MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name),
ossdev->out_caps.szPname, ossdev->out_caps.szPname,
sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR)); sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR));
......
...@@ -62,7 +62,7 @@ typedef struct _DSDRIVERDESC ...@@ -62,7 +62,7 @@ typedef struct _DSDRIVERDESC
{ {
DWORD dwFlags; DWORD dwFlags;
CHAR szDesc[256]; CHAR szDesc[256];
CHAR szDrvName[256]; CHAR szDrvname[256];
DWORD dnDevNode; DWORD dnDevNode;
WORD wVxdId; WORD wVxdId;
WORD wReserved; WORD wReserved;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment