winealsa: Use nameless unions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-03-24 18:37:41 +01:00 committed by Alexandre Julliard
parent ac23adbdec
commit 1610c80a39
2 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,6 @@ MODULE = winealsa.drv
IMPORTS = uuid ole32 advapi32
DELAYIMPORTS = winmm
EXTRALIBS = $(ALSA_LIBS)
EXTRADEFS = -DWINE_NO_NAMELESS_EXTENSION
C_SRCS = \
midi.c \

View File

@ -4324,15 +4324,15 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI
serial_number = (guid->Data4[4] << 24) | (guid->Data4[5] << 16) | (guid->Data4[6] << 8) | guid->Data4[7];
out->vt = VT_LPWSTR;
out->u.pwszVal = CoTaskMemAlloc(128 * sizeof(WCHAR));
out->pwszVal = CoTaskMemAlloc(128 * sizeof(WCHAR));
if(!out->u.pwszVal)
if(!out->pwszVal)
return E_OUTOFMEMORY;
if(connection == AudioDeviceConnectionType_USB)
sprintfW( out->u.pwszVal, usbformatW, vendor_id, product_id, device, serial_number);
sprintfW( out->pwszVal, usbformatW, vendor_id, product_id, device, serial_number);
else if(connection == AudioDeviceConnectionType_PCI)
sprintfW( out->u.pwszVal, pciformatW, vendor_id, product_id, device, serial_number);
sprintfW( out->pwszVal, pciformatW, vendor_id, product_id, device, serial_number);
return S_OK;
}
@ -4356,15 +4356,15 @@ HRESULT WINAPI AUDDRV_GetPropValue(GUID *guid, const PROPERTYKEY *prop, PROPVARI
out->vt = VT_UI4;
if (num_speakers > 6)
out->u.ulVal = KSAUDIO_SPEAKER_STEREO;
out->ulVal = KSAUDIO_SPEAKER_STEREO;
else if (num_speakers == 6)
out->u.ulVal = KSAUDIO_SPEAKER_5POINT1;
out->ulVal = KSAUDIO_SPEAKER_5POINT1;
else if (num_speakers >= 4)
out->u.ulVal = KSAUDIO_SPEAKER_QUAD;
out->ulVal = KSAUDIO_SPEAKER_QUAD;
else if (num_speakers >= 2)
out->u.ulVal = KSAUDIO_SPEAKER_STEREO;
out->ulVal = KSAUDIO_SPEAKER_STEREO;
else if (num_speakers == 1)
out->u.ulVal = KSAUDIO_SPEAKER_MONO;
out->ulVal = KSAUDIO_SPEAKER_MONO;
return S_OK;
}