Paul Gofman (@gofman) commented about dlls/mmdevapi/devenum.c:
PropVariantClear(&pv2); }
- MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv); MMDevice_SetPropValue(id, flow, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv); + + if (flow == eCapture) + type = L"Microphone"; + else if (flow == eRender) + type = L"Speakers"; + + pv.pwszVal = (LPWSTR)type;
Extra type variable looks excessive, also flow can be only eRender or eCapture here. So probably just ```pv.pwszVal = (LPWSTR)(flow == eCapture ? L"Microphone" : L"Speakers")```? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9915#note_127413