mmdevapi: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-14 09:27:50 +01:00 committed by Alexandre Julliard
parent 210abcd81a
commit 86891eeadf
5 changed files with 60 additions and 61 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = mmdevapi.dll
IMPORTS = uuid ole32 oleaut32 user32 advapi32

View file

@ -78,7 +78,7 @@ static ULONG WINAPI AEV_AddRef(IAudioEndpointVolumeEx *iface)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
return ref;
}
@ -86,7 +86,7 @@ static ULONG WINAPI AEV_Release(IAudioEndpointVolumeEx *iface)
{
AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
if (!ref)
AudioEndpointVolume_Destroy(This);
return ref;

View file

@ -117,14 +117,14 @@ static HRESULT MMDevPropStore_OpenPropKey(const GUID *guid, DWORD flow, HKEY *pr
StringFromGUID2(guid, buffer, 39);
if ((ret = RegOpenKeyExW(flow == eRender ? key_render : key_capture, buffer, 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, &key)) != ERROR_SUCCESS)
{
WARN("Opening key %s failed with %u\n", debugstr_w(buffer), ret);
WARN("Opening key %s failed with %lu\n", debugstr_w(buffer), ret);
return E_FAIL;
}
ret = RegOpenKeyExW(key, L"Properties", 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, propkey);
RegCloseKey(key);
if (ret != ERROR_SUCCESS)
{
WARN("Opening key Properties failed with %u\n", ret);
WARN("Opening key Properties failed with %lu\n", ret);
return E_FAIL;
}
return S_OK;
@ -148,7 +148,7 @@ static HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
ret = RegGetValueW(regkey, NULL, buffer, RRF_RT_ANY, &type, NULL, &size);
if (ret != ERROR_SUCCESS)
{
WARN("Reading %s returned %d\n", debugstr_w(buffer), ret);
WARN("Reading %s returned %ld\n", debugstr_w(buffer), ret);
RegCloseKey(regkey);
PropVariantClear(pv);
return S_OK;
@ -184,7 +184,7 @@ static HRESULT MMDevice_GetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
break;
}
default:
ERR("Unknown/unhandled type: %u\n", type);
ERR("Unknown/unhandled type: %lu\n", type);
PropVariantClear(pv);
break;
}
@ -216,7 +216,7 @@ static HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
case VT_BLOB:
{
ret = RegSetValueExW(regkey, buffer, 0, REG_BINARY, pv->blob.pBlobData, pv->blob.cbSize);
TRACE("Blob %p %u\n", pv->blob.pBlobData, pv->blob.cbSize);
TRACE("Blob %p %lu\n", pv->blob.pBlobData, pv->blob.cbSize);
break;
}
@ -232,7 +232,7 @@ static HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
break;
}
RegCloseKey(regkey);
TRACE("Writing %s returned %u\n", debugstr_w(buffer), ret);
TRACE("Writing %s returned %lu\n", debugstr_w(buffer), ret);
return hr;
}
@ -387,7 +387,7 @@ HRESULT load_devices_from_reg(void)
{
RegCloseKey(key_capture);
key_render = key_capture = NULL;
WARN("Couldn't create key: %u\n", ret);
WARN("Couldn't create key: %lu\n", ret);
return E_FAIL;
}
@ -529,7 +529,7 @@ static ULONG WINAPI MMDevice_AddRef(IMMDevice *iface)
LONG ref;
ref = InterlockedIncrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
@ -539,7 +539,7 @@ static ULONG WINAPI MMDevice_Release(IMMDevice *iface)
LONG ref;
ref = InterlockedDecrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
@ -548,7 +548,7 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls
HRESULT hr = E_NOINTERFACE;
MMDevice *This = impl_from_IMMDevice(iface);
TRACE("(%p)->(%s, %x, %p, %p)\n", iface, debugstr_guid(riid), clsctx, params, ppv);
TRACE("(%p)->(%s, %lx, %p, %p)\n", iface, debugstr_guid(riid), clsctx, params, ppv);
if (!ppv)
return E_POINTER;
@ -630,14 +630,14 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls
if (FAILED(hr))
*ppv = NULL;
TRACE("Returning %08x\n", hr);
TRACE("Returning %08lx\n", hr);
return hr;
}
static HRESULT WINAPI MMDevice_OpenPropertyStore(IMMDevice *iface, DWORD access, IPropertyStore **ppv)
{
MMDevice *This = impl_from_IMMDevice(iface);
TRACE("(%p)->(%x,%p)\n", This, access, ppv);
TRACE("(%p)->(%lx,%p)\n", This, access, ppv);
if (!ppv)
return E_POINTER;
@ -773,7 +773,7 @@ static ULONG WINAPI MMDevCol_AddRef(IMMDeviceCollection *iface)
{
MMDevColImpl *This = impl_from_IMMDeviceCollection(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
@ -781,7 +781,7 @@ static ULONG WINAPI MMDevCol_Release(IMMDeviceCollection *iface)
{
MMDevColImpl *This = impl_from_IMMDeviceCollection(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
if (!ref)
MMDevCol_Destroy(This);
return ref;
@ -878,7 +878,7 @@ static ULONG WINAPI MMDevEnum_AddRef(IMMDeviceEnumerator *iface)
{
MMDevEnumImpl *This = impl_from_IMMDeviceEnumerator(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
@ -886,14 +886,14 @@ static ULONG WINAPI MMDevEnum_Release(IMMDeviceEnumerator *iface)
{
MMDevEnumImpl *This = impl_from_IMMDeviceEnumerator(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
static HRESULT WINAPI MMDevEnum_EnumAudioEndpoints(IMMDeviceEnumerator *iface, EDataFlow flow, DWORD mask, IMMDeviceCollection **devices)
{
MMDevEnumImpl *This = impl_from_IMMDeviceEnumerator(iface);
TRACE("(%p)->(%u,%u,%p)\n", This, flow, mask, devices);
TRACE("(%p)->(%u,%lu,%p)\n", This, flow, mask, devices);
if (!devices)
return E_POINTER;
*devices = NULL;
@ -1011,7 +1011,7 @@ static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHA
hr = IMMDevice_GetId(dev, &str);
if (FAILED(hr))
{
WARN("GetId failed: %08x\n", hr);
WARN("GetId failed: %08lx\n", hr);
continue;
}
@ -1073,7 +1073,7 @@ static BOOL notify_if_changed(EDataFlow flow, ERole role, HKEY key,
if(def_dev){
hr = IMMDevice_GetId(def_dev, &id);
if(FAILED(hr)){
ERR("GetId failed: %08x\n", hr);
ERR("GetId failed: %08lx\n", hr);
return FALSE;
}
}else
@ -1106,7 +1106,7 @@ static BOOL notify_if_changed(EDataFlow flow, ERole role, HKEY key,
if(def_dev){
hr = IMMDevice_GetId(def_dev, &id);
if(FAILED(hr)){
ERR("GetId failed: %08x\n", hr);
ERR("GetId failed: %08lx\n", hr);
return FALSE;
}
}else
@ -1132,7 +1132,7 @@ static DWORD WINAPI notif_thread_proc(void *user)
if(RegCreateKeyExW(HKEY_CURRENT_USER, reg_key, 0, NULL, 0,
MAXIMUM_ALLOWED, NULL, &key, NULL) != ERROR_SUCCESS){
ERR("RegCreateKeyEx failed: %u\n", GetLastError());
ERR("RegCreateKeyEx failed: %lu\n", GetLastError());
return 1;
}
@ -1155,7 +1155,7 @@ static DWORD WINAPI notif_thread_proc(void *user)
while(1){
if(RegNotifyChangeKeyValue(key, FALSE, REG_NOTIFY_CHANGE_LAST_SET,
NULL, FALSE) != ERROR_SUCCESS){
ERR("RegNotifyChangeKeyValue failed: %u\n", GetLastError());
ERR("RegNotifyChangeKeyValue failed: %lu\n", GetLastError());
RegCloseKey(key);
g_notif_thread = NULL;
return 1;
@ -1205,7 +1205,7 @@ static HRESULT WINAPI MMDevEnum_RegisterEndpointNotificationCallback(IMMDeviceEn
if(!g_notif_thread){
g_notif_thread = CreateThread(NULL, 0, notif_thread_proc, NULL, 0, NULL);
if(!g_notif_thread)
ERR("CreateThread failed: %u\n", GetLastError());
ERR("CreateThread failed: %lu\n", GetLastError());
}
LeaveCriticalSection(&g_notif_lock);
@ -1264,7 +1264,7 @@ static HRESULT MMDevPropStore_Create(MMDevice *parent, DWORD access, IPropertySt
&& access != STGM_WRITE
&& access != STGM_READWRITE)
{
WARN("Invalid access %08x\n", access);
WARN("Invalid access %08lx\n", access);
return E_INVALIDARG;
}
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
@ -1305,7 +1305,7 @@ static ULONG WINAPI MMDevPropStore_AddRef(IPropertyStore *iface)
{
MMDevPropStore *This = impl_from_IPropertyStore(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
return ref;
}
@ -1313,7 +1313,7 @@ static ULONG WINAPI MMDevPropStore_Release(IPropertyStore *iface)
{
MMDevPropStore *This = impl_from_IPropertyStore(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("Refcount now %i\n", ref);
TRACE("Refcount now %li\n", ref);
if (!ref)
MMDevPropStore_Destroy(This);
return ref;
@ -1341,7 +1341,7 @@ static HRESULT WINAPI MMDevPropStore_GetCount(IPropertyStore *iface, DWORD *npro
i++;
} while (1);
RegCloseKey(propkey);
TRACE("Returning %i\n", i);
TRACE("Returning %li\n", i);
*nprops = i;
return S_OK;
}
@ -1354,7 +1354,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR
HRESULT hr;
HKEY propkey;
TRACE("(%p)->(%u,%p)\n", iface, prop, key);
TRACE("(%p)->(%lu,%p)\n", iface, prop, key);
if (!key)
return E_POINTER;
@ -1365,7 +1365,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR
if (RegEnumValueW(propkey, prop, buffer, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS
|| len <= 39)
{
WARN("GetAt %u failed\n", prop);
WARN("GetAt %lu failed\n", prop);
return E_INVALIDARG;
}
RegCloseKey(propkey);
@ -1378,7 +1378,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR
static HRESULT WINAPI MMDevPropStore_GetValue(IPropertyStore *iface, REFPROPERTYKEY key, PROPVARIANT *pv)
{
MMDevPropStore *This = impl_from_IPropertyStore(iface);
TRACE("(%p)->(\"%s,%u\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv);
TRACE("(%p)->(\"%s,%lu\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv);
if (!key || !pv)
return E_POINTER;
@ -1403,7 +1403,7 @@ static HRESULT WINAPI MMDevPropStore_GetValue(IPropertyStore *iface, REFPROPERTY
static HRESULT WINAPI MMDevPropStore_SetValue(IPropertyStore *iface, REFPROPERTYKEY key, REFPROPVARIANT pv)
{
MMDevPropStore *This = impl_from_IPropertyStore(iface);
TRACE("(%p)->(\"%s,%u\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv);
TRACE("(%p)->(\"%s,%lu\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv);
if (!key || !pv)
return E_POINTER;
@ -1506,7 +1506,7 @@ static ULONG WINAPI info_device_ps_Release(IPropertyStore *iface)
static HRESULT WINAPI info_device_ps_GetValue(IPropertyStore *iface,
REFPROPERTYKEY key, PROPVARIANT *pv)
{
TRACE("(static)->(\"%s,%u\", %p)\n", debugstr_guid(&key->fmtid), key ? key->pid : 0, pv);
TRACE("(static)->(\"%s,%lu\", %p)\n", debugstr_guid(&key->fmtid), key ? key->pid : 0, pv);
if (!key || !pv)
return E_POINTER;
@ -1554,7 +1554,7 @@ static ULONG WINAPI info_device_Release(IMMDevice *iface)
static HRESULT WINAPI info_device_OpenPropertyStore(IMMDevice *iface,
DWORD access, IPropertyStore **ppv)
{
TRACE("(static)->(%x, %p)\n", access, ppv);
TRACE("(static)->(%lx, %p)\n", access, ppv);
*ppv = &info_device_ps;
return S_OK;
}

View file

@ -75,7 +75,7 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
driver->module = LoadLibraryW(driver_module);
if(!driver->module){
TRACE("Unable to load %s: %u\n", wine_dbgstr_w(driver_module),
TRACE("Unable to load %s: %lu\n", wine_dbgstr_w(driver_module),
GetLastError());
return FALSE;
}
@ -159,7 +159,7 @@ static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
TRACE("(0x%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
@ -335,7 +335,7 @@ static ULONG WINAPI activate_async_op_AddRef(IActivateAudioInterfaceAsyncOperati
{
struct activate_async_op *This = impl_from_IActivateAudioInterfaceAsyncOperation(iface);
LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) refcount now %i\n", This, ref);
TRACE("(%p) refcount now %li\n", This, ref);
return ref;
}
@ -343,7 +343,7 @@ static ULONG WINAPI activate_async_op_Release(IActivateAudioInterfaceAsyncOperat
{
struct activate_async_op *This = impl_from_IActivateAudioInterfaceAsyncOperation(iface);
LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) refcount now %i\n", This, ref);
TRACE("(%p) refcount now %li\n", This, ref);
if (!ref) {
if(This->result_iface)
IUnknown_Release(This->result_iface);
@ -399,7 +399,7 @@ static HRESULT get_mmdevice_by_activatepath(const WCHAR *path, IMMDevice **mmdev
hr = MMDevEnum_Create(&IID_IMMDeviceEnumerator, (void**)&devenum);
if (FAILED(hr)) {
WARN("Failed to create MMDeviceEnumerator: %08x\n", hr);
WARN("Failed to create MMDeviceEnumerator: %08lx\n", hr);
return hr;
}
@ -419,7 +419,7 @@ static HRESULT get_mmdevice_by_activatepath(const WCHAR *path, IMMDevice **mmdev
}
if (FAILED(hr)) {
WARN("Failed to get requested device (%s): %08x\n", debugstr_w(path), hr);
WARN("Failed to get requested device (%s): %08lx\n", debugstr_w(path), hr);
*mmdev = NULL;
hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
}

View file

@ -146,7 +146,7 @@ static ULONG WINAPI SAO_AddRef(ISpatialAudioObject *iface)
{
SpatialAudioObjectImpl *This = impl_from_ISpatialAudioObject(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
return ref;
}
@ -154,7 +154,7 @@ static ULONG WINAPI SAO_Release(ISpatialAudioObject *iface)
{
SpatialAudioObjectImpl *This = impl_from_ISpatialAudioObject(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
if(!ref){
EnterCriticalSection(&This->sa_stream->lock);
list_remove(&This->entry);
@ -272,7 +272,7 @@ static ULONG WINAPI SAORS_AddRef(ISpatialAudioObjectRenderStream *iface)
{
SpatialAudioStreamImpl *This = impl_from_ISpatialAudioObjectRenderStream(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
return ref;
}
@ -280,7 +280,7 @@ static ULONG WINAPI SAORS_Release(ISpatialAudioObjectRenderStream *iface)
{
SpatialAudioStreamImpl *This = impl_from_ISpatialAudioObjectRenderStream(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
if(!ref){
IAudioClient_Stop(This->client);
if(This->update_frames != ~0 && This->update_frames > 0)
@ -325,7 +325,7 @@ static HRESULT WINAPI SAORS_Start(ISpatialAudioObjectRenderStream *iface)
hr = IAudioClient_Start(This->client);
if(FAILED(hr)){
WARN("IAudioClient::Start failed: %08x\n", hr);
WARN("IAudioClient::Start failed: %08lx\n", hr);
return hr;
}
@ -341,7 +341,7 @@ static HRESULT WINAPI SAORS_Stop(ISpatialAudioObjectRenderStream *iface)
hr = IAudioClient_Stop(This->client);
if(FAILED(hr)){
WARN("IAudioClient::Stop failed: %08x\n", hr);
WARN("IAudioClient::Stop failed: %08lx\n", hr);
return hr;
}
@ -377,7 +377,7 @@ static HRESULT WINAPI SAORS_BeginUpdatingAudioObjects(ISpatialAudioObjectRenderS
if(This->update_frames > 0){
hr = IAudioRenderClient_GetBuffer(This->render, This->update_frames, (BYTE **)&This->buf);
if(FAILED(hr)){
WARN("GetBuffer failed: %08x\n", hr);
WARN("GetBuffer failed: %08lx\n", hr);
This->update_frames = ~0;
LeaveCriticalSection(&This->lock);
return hr;
@ -441,7 +441,7 @@ static HRESULT WINAPI SAORS_EndUpdatingAudioObjects(ISpatialAudioObjectRenderStr
hr = IAudioRenderClient_ReleaseBuffer(This->render, This->update_frames, 0);
if(FAILED(hr))
WARN("ReleaseBuffer failed: %08x\n", hr);
WARN("ReleaseBuffer failed: %08lx\n", hr);
}
This->update_frames = ~0;
@ -538,7 +538,7 @@ static ULONG WINAPI SAC_AddRef(ISpatialAudioClient *iface)
{
SpatialAudioImpl *This = impl_from_ISpatialAudioClient(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
return ref;
}
@ -546,7 +546,7 @@ static ULONG WINAPI SAC_Release(ISpatialAudioClient *iface)
{
SpatialAudioImpl *This = impl_from_ISpatialAudioClient(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) new ref %u\n", This, ref);
TRACE("(%p) new ref %lu\n", This, ref);
if (!ref) {
IMMDevice_Release(This->mmdev);
heap_free(This);
@ -637,12 +637,12 @@ static const char *debugstr_fmtex(const WAVEFORMATEX *fmt)
static char buf[2048];
if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE){
const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt;
snprintf(buf, sizeof(buf), "tag: 0x%x (%s), ch: %u (mask: 0x%x), rate: %u, depth: %u",
snprintf(buf, sizeof(buf), "tag: 0x%x (%s), ch: %u (mask: 0x%lx), rate: %lu, depth: %u",
fmt->wFormatTag, debugstr_guid(&fmtex->SubFormat),
fmt->nChannels, fmtex->dwChannelMask, fmt->nSamplesPerSec,
fmt->wBitsPerSample);
}else{
snprintf(buf, sizeof(buf), "tag: 0x%x, ch: %u, rate: %u, depth: %u",
snprintf(buf, sizeof(buf), "tag: 0x%x, ch: %u, rate: %lu, depth: %u",
fmt->wFormatTag, fmt->nChannels, fmt->nSamplesPerSec,
fmt->wBitsPerSample);
}
@ -694,13 +694,13 @@ static HRESULT activate_stream(SpatialAudioStreamImpl *stream)
hr = IMMDevice_Activate(stream->sa_client->mmdev, &IID_IAudioClient,
CLSCTX_INPROC_SERVER, NULL, (void**)&stream->client);
if(FAILED(hr)){
WARN("Activate failed: %08x\n", hr);
WARN("Activate failed: %08lx\n", hr);
return hr;
}
hr = IAudioClient_GetDevicePeriod(stream->client, &period, NULL);
if(FAILED(hr)){
WARN("GetDevicePeriod failed: %08x\n", hr);
WARN("GetDevicePeriod failed: %08lx\n", hr);
IAudioClient_Release(stream->client);
return hr;
}
@ -721,21 +721,21 @@ static HRESULT activate_stream(SpatialAudioStreamImpl *stream)
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
period, 0, &stream->stream_fmtex.Format, NULL);
if(FAILED(hr)){
WARN("Initialize failed: %08x\n", hr);
WARN("Initialize failed: %08lx\n", hr);
IAudioClient_Release(stream->client);
return hr;
}
hr = IAudioClient_SetEventHandle(stream->client, stream->params.EventHandle);
if(FAILED(hr)){
WARN("SetEventHandle failed: %08x\n", hr);
WARN("SetEventHandle failed: %08lx\n", hr);
IAudioClient_Release(stream->client);
return hr;
}
hr = IAudioClient_GetService(stream->client, &IID_IAudioRenderClient, (void**)&stream->render);
if(FAILED(hr)){
WARN("GetService(AudioRenderClient) failed: %08x\n", hr);
WARN("GetService(AudioRenderClient) failed: %08lx\n", hr);
IAudioClient_Release(stream->client);
return hr;
}
@ -931,7 +931,7 @@ HRESULT SpatialAudioClient_Create(IMMDevice *mmdev, ISpatialAudioClient **out)
hr = IMMDevice_Activate(mmdev, &IID_IAudioClient,
CLSCTX_INPROC_SERVER, NULL, (void**)&aclient);
if(FAILED(hr)){
WARN("Activate failed: %08x\n", hr);
WARN("Activate failed: %08lx\n", hr);
heap_free(obj);
return hr;
}
@ -962,7 +962,7 @@ HRESULT SpatialAudioClient_Create(IMMDevice *mmdev, ISpatialAudioClient **out)
sizeof(WAVEFORMATEX) + closest->cbSize);
CoTaskMemFree(closest);
} else if(hr != S_OK){
WARN("Checking supported formats failed: %08x\n", hr);
WARN("Checking supported formats failed: %08lx\n", hr);
heap_free(obj);
return hr;
}