Commit 6831b71f authored by Davide Beatrici's avatar Davide Beatrici Committed by Alexandre Julliard

wineoss: Remove GetEndpointIDs.

parent 9b681e03
...@@ -205,64 +205,3 @@ BOOL WINAPI get_device_name_from_guid(GUID *guid, char **name, EDataFlow *flow) ...@@ -205,64 +205,3 @@ BOOL WINAPI get_device_name_from_guid(GUID *guid, char **name, EDataFlow *flow)
return FALSE; return FALSE;
} }
HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **guids_out,
UINT *num, UINT *def_index)
{
struct get_endpoint_ids_params params;
GUID *guids = NULL;
WCHAR **ids = NULL;
unsigned int i;
TRACE("%d %p %p %p %p\n", flow, ids, guids, num, def_index);
params.flow = flow;
params.size = 1000;
params.endpoints = NULL;
do{
HeapFree(GetProcessHeap(), 0, params.endpoints);
params.endpoints = HeapAlloc(GetProcessHeap(), 0, params.size);
OSS_CALL(get_endpoint_ids, &params);
}while(params.result == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER));
if(FAILED(params.result)) goto end;
ids = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, params.num * sizeof(*ids));
guids = HeapAlloc(GetProcessHeap(), 0, params.num * sizeof(*guids));
if(!ids || !guids){
params.result = E_OUTOFMEMORY;
goto end;
}
for(i = 0; i < params.num; i++){
WCHAR *name = (WCHAR *)((char *)params.endpoints + params.endpoints[i].name);
char *device = (char *)params.endpoints + params.endpoints[i].device;
unsigned int name_size = (wcslen(name) + 1) * sizeof(WCHAR);
ids[i] = HeapAlloc(GetProcessHeap(), 0, name_size);
if(!ids[i]){
params.result = E_OUTOFMEMORY;
goto end;
}
memcpy(ids[i], name, name_size);
get_device_guid(flow, device, guids + i);
}
*def_index = params.default_idx;
end:
HeapFree(GetProcessHeap(), 0, params.endpoints);
if(FAILED(params.result)){
HeapFree(GetProcessHeap(), 0, guids);
if(ids){
for(i = 0; i < params.num; i++)
HeapFree(GetProcessHeap(), 0, ids[i]);
HeapFree(GetProcessHeap(), 0, ids);
}
}else{
*ids_out = ids;
*guids_out = guids;
*num = params.num;
}
return params.result;
}
...@@ -7,4 +7,3 @@ ...@@ -7,4 +7,3 @@
# MMDevAPI driver functions # MMDevAPI driver functions
@ stdcall -private get_device_guid(long ptr ptr) get_device_guid @ 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 get_device_name_from_guid(ptr ptr ptr) get_device_name_from_guid
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
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