From: Davide Beatrici git@davidebeatrici.dev
--- dlls/winecoreaudio.drv/mmdevdrv.c | 60 ------------------- dlls/winecoreaudio.drv/winecoreaudio.drv.spec | 1 - 2 files changed, 61 deletions(-)
diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 8e8fc57f47d..b8992618a5a 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -151,66 +151,6 @@ void WINAPI get_device_guid(EDataFlow flow, const char *dev, GUID *guid) RegCloseKey(key); }
-HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, - GUID **guids_out, UINT *num, UINT *def_index) -{ - struct get_endpoint_ids_params params; - unsigned int i; - GUID *guids = NULL; - WCHAR **ids = NULL; - - TRACE("%d %p %p %p\n", flow, ids_out, num, def_index); - - params.flow = flow; - params.size = 1000; - params.endpoints = NULL; - do{ - heap_free(params.endpoints); - params.endpoints = heap_alloc(params.size); - UNIX_CALL(get_endpoint_ids, ¶ms); - }while(params.result == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)); - - if(FAILED(params.result)) goto end; - - ids = heap_alloc_zero(params.num * sizeof(*ids)); - guids = heap_alloc(params.num * sizeof(*guids)); - if(!ids || !guids){ - params.result = E_OUTOFMEMORY; - goto end; - } - - for(i = 0; i < params.num; i++){ - const WCHAR *name = (WCHAR *)((char *)params.endpoints + params.endpoints[i].name); - const char *device = (char *)params.endpoints + params.endpoints[i].device; - const unsigned int size = (wcslen(name) + 1) * sizeof(WCHAR); - - ids[i] = heap_alloc(size); - if(!ids[i]){ - params.result = E_OUTOFMEMORY; - goto end; - } - memcpy(ids[i], name, size); - get_device_guid(flow, device, guids + i); - } - *def_index = params.default_idx; - -end: - heap_free(params.endpoints); - if(FAILED(params.result)){ - heap_free(guids); - if(ids){ - for(i = 0; i < params.num; i++) heap_free(ids[i]); - heap_free(ids); - } - }else{ - *ids_out = ids; - *guids_out = guids; - *num = params.num; - } - - return params.result; -} - BOOL WINAPI get_device_name_from_guid(const GUID *guid, char **name, EDataFlow *flow) { HKEY devices_key; diff --git a/dlls/winecoreaudio.drv/winecoreaudio.drv.spec b/dlls/winecoreaudio.drv/winecoreaudio.drv.spec index 5dbdf80bd23..0537f2d2d8b 100644 --- a/dlls/winecoreaudio.drv/winecoreaudio.drv.spec +++ b/dlls/winecoreaudio.drv/winecoreaudio.drv.spec @@ -6,4 +6,3 @@ # MMDevAPI driver functions @ stdcall -private get_device_guid(long ptr ptr) get_device_guid @ stdcall -private get_device_name_from_guid(ptr ptr ptr) get_device_name_from_guid -@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs