Commit 8d812e23 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

winecoreaudio: Store the device id as a DWORD.

parent 37265acd
...@@ -129,7 +129,7 @@ struct ACImpl { ...@@ -129,7 +129,7 @@ struct ACImpl {
HANDLE event; HANDLE event;
float *vols; float *vols;
AudioDeviceID adevid; DWORD dev_id;
HANDLE timer; HANDLE timer;
AudioSession *session; AudioSession *session;
...@@ -406,7 +406,7 @@ end: ...@@ -406,7 +406,7 @@ end:
return params.result; return params.result;
} }
static BOOL get_deviceid_by_guid(GUID *guid, AudioDeviceID *id, EDataFlow *flow) static BOOL get_deviceid_by_guid(GUID *guid, DWORD *id, EDataFlow *flow)
{ {
HKEY devices_key; HKEY devices_key;
UINT i = 0; UINT i = 0;
...@@ -470,13 +470,13 @@ static BOOL get_deviceid_by_guid(GUID *guid, AudioDeviceID *id, EDataFlow *flow) ...@@ -470,13 +470,13 @@ static BOOL get_deviceid_by_guid(GUID *guid, AudioDeviceID *id, EDataFlow *flow)
HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient **out) HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient **out)
{ {
ACImpl *This; ACImpl *This;
AudioDeviceID adevid; DWORD dev_id;
EDataFlow dataflow; EDataFlow dataflow;
HRESULT hr; HRESULT hr;
TRACE("%s %p %p\n", debugstr_guid(guid), dev, out); TRACE("%s %p %p\n", debugstr_guid(guid), dev, out);
if(!get_deviceid_by_guid(guid, &adevid, &dataflow)) if(!get_deviceid_by_guid(guid, &dev_id, &dataflow))
return AUDCLNT_E_DEVICE_INVALIDATED; return AUDCLNT_E_DEVICE_INVALIDATED;
if(dataflow != eRender && dataflow != eCapture) if(dataflow != eRender && dataflow != eCapture)
...@@ -504,7 +504,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient ...@@ -504,7 +504,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
This->parent = dev; This->parent = dev;
IMMDevice_AddRef(This->parent); IMMDevice_AddRef(This->parent);
This->adevid = adevid; This->dev_id = dev_id;
*out = (IAudioClient *)&This->IAudioClient3_iface; *out = (IAudioClient *)&This->IAudioClient3_iface;
IAudioClient3_AddRef(&This->IAudioClient3_iface); IAudioClient3_AddRef(&This->IAudioClient3_iface);
...@@ -765,7 +765,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, ...@@ -765,7 +765,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
return AUDCLNT_E_ALREADY_INITIALIZED; return AUDCLNT_E_ALREADY_INITIALIZED;
} }
params.dev_id = This->adevid; params.dev_id = This->dev_id;
params.flow = This->dataflow; params.flow = This->dataflow;
params.share = mode; params.share = mode;
params.duration = duration; params.duration = duration;
...@@ -882,7 +882,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface, ...@@ -882,7 +882,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient3 *iface,
TRACE("(%p)->(%x, %p, %p)\n", This, mode, pwfx, outpwfx); TRACE("(%p)->(%x, %p, %p)\n", This, mode, pwfx, outpwfx);
if(pwfx) dump_fmt(pwfx); if(pwfx) dump_fmt(pwfx);
params.dev_id = This->adevid; params.dev_id = This->dev_id;
params.flow = This->dataflow; params.flow = This->dataflow;
params.share = mode; params.share = mode;
params.fmt_in = pwfx; params.fmt_in = pwfx;
...@@ -915,7 +915,7 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient3 *iface, ...@@ -915,7 +915,7 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient3 *iface,
return E_POINTER; return E_POINTER;
*pwfx = NULL; *pwfx = NULL;
params.dev_id = This->adevid; params.dev_id = This->dev_id;
params.flow = This->dataflow; params.flow = This->dataflow;
params.fmt = CoTaskMemAlloc(sizeof(WAVEFORMATEXTENSIBLE)); params.fmt = CoTaskMemAlloc(sizeof(WAVEFORMATEXTENSIBLE));
if(!params.fmt) if(!params.fmt)
......
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